zoukankan      html  css  js  c++  java
  • Guid.ToString Method

    Guid.ToString Method

    Returns a string representation of the value of this instance of the Guid structure.

    ToString(String)          

    Returns a string representation of the value of this Guid instance, according to the provided format specifier.

    public string ToString (string format);

    Parameters

    format
    String

    A single format specifier that indicates how to format the value of this Guid. The format parameter can be "N", "D", "B", "P", or "X". If format is null or an empty string (""), "D" is used.

    Returns

    String

    The value of this Guid, represented as a series of lowercase hexadecimal digits in the specified format.

    Exceptions

    The value of format is not null, an empty string (""), "N", "D", "B", "P", or "X".

    Remarks

    The following table shows the accepted format specifiers for the format parameter. "0" represents a digit; hyphens ("-"), braces ("{", "}"), and parentheses ("(", ")") appear as shown.

    Remarks
    SpecifierFormat of return value
    N 32 digits:

    00000000000000000000000000000000
    D 32 digits separated by hyphens:

    00000000-0000-0000-0000-000000000000
    B 32 digits separated by hyphens, enclosed in braces:

    {00000000-0000-0000-0000-000000000000}
    P 32 digits separated by hyphens, enclosed in parentheses:

    (00000000-0000-0000-0000-000000000000)
    X Four hexadecimal values enclosed in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:

    {0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}

    The hexadecimal digits a through f are lowercase in the returned string. To convert them to uppercase, call the String.ToUpper method on the returned string.

  • 相关阅读:
    pom.xml将jar包导入
    获取当前系统日期的前一天日期
    判断socket连接是否失效
    java读取数据,2,2,1方式读取
    笔记
    回调机制
    吧字符串按逗号分割为数组
    时间格式的转变
    java.net.SocketException四大异常解决方案
    log4j
  • 原文地址:https://www.cnblogs.com/chucklu/p/13209084.html
Copyright © 2011-2022 走看看