singrdk/base/Windows/csic/test/struct2.cs

27 lines
377 B
C#
Raw Normal View History

2008-11-17 18:29:00 -05:00
using System;
struct Sky {
public int sun;
public int rain;
}
public class Test {
Sky sky;
public int F() {
return G();
}
public int G() {
sky.sun=30;
sky.rain=70;
Console.WriteLine(sky.ToString());
Console.WriteLine(sky.sun.ToString());
return(sky.rain);
}
public static int Main() {
Test t=new Test();
return t.F();
}
}