字符串对象区别

 

using System;

namespace ConsoleApp1
{
    class Program
    {
        public const int a1 = 5;
        public const string a2 = "zhangsan";
        static void Main(string[] args)
        {
            Console.WriteLine((byte)ErrorCode.E100003);
            Console.WriteLine(ErrorCode.E100003);
            Console.WriteLine(a1);
            Console.WriteLine(a2);
            int x = 2;
            Console.WriteLine(x);
            string s1 = "Hello World!";
            string s2 = "Hello World!";
            Console.WriteLine(s1);
            Console.WriteLine(s2);
        }
    }
}
    public enum ErrorCode : byte
    {
        E100003 = 3,
        E100005 = 5
    }

 

 

原文地址:https://www.cnblogs.com/yiyanwei/p/15744086.html