String和C#中的string有什么区别?
字符串代表System.String,而字符串是System.String在C#中的别名-
例如
string str = "Welcome!";
这不是必需的,但通常在使用类时使用String。
string str = String.Format("Welcome! {0}!", user);由于该字符串是System的别名。串。其他数据类型的别名为-
示例
object: System.Object string: System.String bool: System.Boolean float: System.Single double: System.Double decimal: System.Decimal byte: System.Byte sbyte: System.SByte short: System.Int16 ushort: System.UInt16 int: System.Int32 uint: System.UInt32 long: System.Int64 ulong: System.UInt64 char: System.Char
热门推荐
10 新年门口花束祝福语简短
11 盘锦结婚祝福语大全简短
12 父母生日祝福语 简短独特
13 家庭恩爱祝福语简短英文
14 高考俄语祝福语大全简短
15 虎年祝福语 诗句唯美简短
16 生日婚礼祝福语简短精辟
17 虎年喝酒拜年祝福语简短
18 教师闺蜜祝福语简短