在寫C系列的語言會常用到
using System; namespace ConsoleApplication2 { internal class Program { struct Mydata { public String name; public int number; } private static void Main(string[] args) { Mydata data = new Mydata(); data.name = "王小明"; data.number = 15; Console.WriteLine("姓名:" + data.name + "\n" + "號碼:" + data.number); Console.ReadKey(); } } }