Public struct XXX (under class, on static void main)

Source: Internet
Author: User

Public struct XXX (under class, on static void main)

Class Program

{// You dare not forget your country! // Xiao Shuo (Gao Xiaosong video)

Public struct jiegouti // create the type of the item in the Variable

{// Public indicates that it is common! Class can be used!

Public int fenshu;

Public string name;

Public shuxing SX; // in this case, shuxing is a variable type, and SX is one of its items. SX contains the following items! New jiegouti. New is not used when SX is used!

}

Public struct shuxing

{

Public String hunfou;

Public String xueli;

}

Static void main (string [] ARGs)

{

/* Jiegouti A = new jiegouti (); // create an initialization variable.

A. Name = "James ";

A. fenshu = 99; // assign a value to the variable as needed!

A. SX. hunfou = "yihun"; // because jiegouti contains shuxing and shuxing contains Sx, A. SX ....... You can assign values directly!

A. SX. xueli = "manager ";

Console. writeline (A. Name + A. SX. hunfou + A. SX. xueli );

Console. writeline (A. fenshu );

Console. Readline ();*/

}

}

Public struct XXX (under class, on static void main)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.