Program Structure II

简介:   Value: stack, System.ValueType out: needn't initial before use. Should be initial before use ref.

 

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();

目录
打赏
0
0
0
0
20
分享
相关文章
用IAR打开STM8时,出现“Unable to create configuration 'Debug' using tool chain ‘STM8’
用IAR打开STM8时,出现“Unable to create configuration 'Debug' using tool chain ‘STM8’
487 0
Crystallographic Information File
Crystallographic Information File(CIF)是一种用于存储晶体结构信息的标准文件格式,通常用于存储X射线衍射、中子衍射、电子衍射等晶体结构分析的数据。CIF文件包含了晶胞参数、原子坐标、晶体对称性等结构信息,是进行晶体结构分析和制备的基础数据。
603 1
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
316 0
gcc is unable to create an executable file.
gcc is unable to create an executable file.
492 0
cl.exe is unable to create an executable file
cl.exe is unable to create an executable file
143 0
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
226 0
编译OpenJDK:invalid configuration Files: machine Files not recognized
编译OpenJDK:invalid configuration Files: machine Files not recognized
132 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等