Skip to content

M_CodeJam_Strings_StringExtensions_ToBase64

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

StringExtensions.ToBase64 Method

Converts an array of bytes to its equivalent string representation that is encoded with base-64 digits. A parameter specifies whether to insert line breaks in the return value.

Namespace: CodeJam.Strings
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static string ToBase64(
	this byte[] data,
	Base64FormattingOptions options = Base64FormattingOptions.None
)

VB

<ExtensionAttribute>
Public Shared Function ToBase64 ( 
	data As Byte(),
	Optional options As Base64FormattingOptions = Base64FormattingOptions.None
) As String

F#

[<ExtensionAttribute>]
static member ToBase64 : 
        data : byte[] * 
        ?options : Base64FormattingOptions 
(* Defaults:
        let _options = defaultArg options Base64FormattingOptions.None
*)
-> string 

Parameters

 

data
Type: System.Byte[]
an array of bytes.
options (Optional)
Type: System.Base64FormattingOptions
InsertLineBreaks to insert a line break every 76 characters, or None to not insert line breaks.

Return Value

Type: String
The string representation in base 64 of the elements in data.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

StringExtensions Class
CodeJam.Strings Namespace

Clone this wiki locally