Coin163

首页 > Program Structure II

Program Structure II

相关标签: structure

2020腾讯云10周年活动,优惠非常大!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1040

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
入口地址https://www.aliyun.com/minisite/goods

 

Value: stack, System.ValueType

out: needn't initial before use.

Should be initial before use ref. Memory: managed heap

params : dynamical array.

 

overload method(in a class)

Rectangle array and staggered multiple dimension array

System.Array

Clear()

Copyto()

Get Enumerator()

Length

Rank

Reverse()

Sort()

 

Enumeration(int, byte, short, int or long)

enum EmpType: byte

{

  Manager=10,

  Grunt=1,

  Contractor=100,

  VicePresident=9

}

 

EmpType emp=EmpType.Contractor;

 

System.Enum

Enum.GetUnderlyingType(typeof(EmpType))

 

        static void Main(string[] args)

        {

            ConsoleColor cc=ConsoleColor.Red;

            Enum e=cc;

            Array enumData = Enum.GetValues(e.GetType());

            for (int i = 0; i < enumData.Length; i++)

                Console.WriteLine("Name:{0}, Value:{0:D}",enumData.GetValue(i));

            Console.ReadLine();

        }

 

struct

class

 

System.Nullable<T> sa= new T?();

 

            int? x = null;

            int? y = 200;

            int? i = x ?? 100;

            int? j = y ?? 100;

            Console.WriteLine("{0}", i.Value);

            Console.WriteLine("{0}", j.Value);

            Console.ReadLine();

原文

  Value: stack, System.ValueType out: needn't initial before use. Should be initial before use ref. Memory: managed heap params : dynamical array.   overload method(in a class) Rec

------分隔线----------------------------
相关推荐