C# 클래스 Netduino.WebServer.Core.Utilities.Converter

파일 보기 프로젝트 열기: martinbuberl/Netduino

공개 메소드들

메소드 설명
FromAspNetAjax ( string dateTime ) : System.DateTime

Converts an ASP.NET AJAX JSON string into a DateTime object.

FromIso8601 ( string dateTime ) : System.DateTime

Converts an ISO 8601 (UTC) time/date format string into a DateTime object.

FromUtf32 ( int utf32 ) : string

Converts a specified code point into a Unicode encoded string.

FromUtf32 ( uint utf32 ) : string
ToGuid ( string value ) : System.Guid

Creates a Guid from a string value.

ToHexString ( double value ) : string

Converts a hexadecimal number to a hexadecimal string.

ToHexString ( int value ) : string

Converts a hexadecimal number to a hexadecimal string.

ToIso8601 ( System.DateTime dateTime ) : string

Converts a DateTime object into an ISO 8601 (UTC) string.

ToString ( double value ) : string

Converts a Double to a string using a variant of the Double.ToString() method. The problem with the built-in ToString() method is that it wont automatically size the precision to fit the number. So a number like 33.3 gets truncated to just 33 unless you specify exactly the right amount of precision. This method attempts to determine the right amount of precision.

CAUTION!!! I've seen many times when the built-in ToString() method returns a rounding error when you specify any meaningful precision.

비공개 메소드들

메소드 설명
ThreeDigits ( int value ) : string

Ensures a three-digit number with leading zeros if necessary.

ToHexStringArray ( byte bytes ) : char[]
TwoCharsToByte ( char charOne, char charTwo ) : byte

Ccombines two characters into a single byte value.

TwoDigits ( int value ) : string

Ensures a two-digit number with leading zero if necessary.

메소드 상세

FromAspNetAjax() 공개 정적인 메소드

Converts an ASP.NET AJAX JSON string into a DateTime object.
public static FromAspNetAjax ( string dateTime ) : System.DateTime
dateTime string
리턴 System.DateTime

FromIso8601() 공개 정적인 메소드

Converts an ISO 8601 (UTC) time/date format string into a DateTime object.
public static FromIso8601 ( string dateTime ) : System.DateTime
dateTime string
리턴 System.DateTime

FromUtf32() 공개 정적인 메소드

Converts a specified code point into a Unicode encoded string.
public static FromUtf32 ( int utf32 ) : string
utf32 int
리턴 string

FromUtf32() 공개 정적인 메소드

public static FromUtf32 ( uint utf32 ) : string
utf32 uint
리턴 string

ToGuid() 공개 정적인 메소드

Creates a Guid from a string value.
public static ToGuid ( string value ) : System.Guid
value string
리턴 System.Guid

ToHexString() 공개 정적인 메소드

Converts a hexadecimal number to a hexadecimal string.
public static ToHexString ( double value ) : string
value double
리턴 string

ToHexString() 공개 정적인 메소드

Converts a hexadecimal number to a hexadecimal string.
public static ToHexString ( int value ) : string
value int
리턴 string

ToIso8601() 공개 정적인 메소드

Converts a DateTime object into an ISO 8601 (UTC) string.
public static ToIso8601 ( System.DateTime dateTime ) : string
dateTime System.DateTime
리턴 string

ToString() 공개 정적인 메소드

Converts a Double to a string using a variant of the Double.ToString() method. The problem with the built-in ToString() method is that it wont automatically size the precision to fit the number. So a number like 33.3 gets truncated to just 33 unless you specify exactly the right amount of precision. This method attempts to determine the right amount of precision.
CAUTION!!! I've seen many times when the built-in ToString() method returns a rounding error when you specify any meaningful precision.
public static ToString ( double value ) : string
value double
리턴 string