BinaryData.FromString Method   
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| FromString(String) | 
						 Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding.  | 
        	
| FromString(String, String) | 
						 Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding and sets MediaType to <see pref="mediaType"></see> value.  | 
        	
FromString(String)
- Source:
 - BinaryData.cs
 
- Source:
 - BinaryData.cs
 
- Source:
 - BinaryData.cs
 
Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding.
public:
 static BinaryData ^ FromString(System::String ^ data);
	public static BinaryData FromString(string data);
	static member FromString : string -> BinaryData
	Public Shared Function FromString (data As String) As BinaryData
	Parameters
- data
 - String
 
The string data.
Returns
A value representing the UTF-8 encoding of data.
Applies to
FromString(String, String)
- Source:
 - BinaryData.cs
 
- Source:
 - BinaryData.cs
 
- Source:
 - BinaryData.cs
 
Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding and sets MediaType to <see pref="mediaType"></see> value.
public:
 static BinaryData ^ FromString(System::String ^ data, System::String ^ mediaType);
	public static BinaryData FromString(string data, string? mediaType);
	static member FromString : string * string -> BinaryData
	Public Shared Function FromString (data As String, mediaType As String) As BinaryData
	Parameters
- data
 - String
 
The string data.
Returns
A value representing the UTF-8 encoding of data.