谁能给我一个c#使用结构的例子
来源:百度知道 编辑:UC知道 时间:2024/09/25 11:19:06
直接可运行的.我写的跑不起来.
using System;
namespace testmono
{
class MainClass
{
public static void Main (string[] args)
{
test t=new test();
t.iTest=1;
t.strTest="2";
Console.WriteLine (t.iTest.ToString());
Console.WriteLine (t.strTest);
}
}
struct test
{
public int iTest;
public string strTest;
}
}