To create a structure, you must use struct keyword followed by the name of the structure. Variables of the structure must be put in curly brackets. In the example below, we create a structure named student containing stnumber, stname, and stsex variables.
public string stnumber;
public string stname;
public string stsex;
You can use the student structure as shown below:
student st=new student();
st.stname = "Dara Yuk";
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: