public struct Point { public int x, y; } Point myPoint = new Point(); a=myPoint.x; b=myPoint.y;
谢谢,对应的VB语言是 Public Structure points Public x As Integer Public y As Integer End Structure Dim mypoints As points = New points mypoints.x = 1 mypoints.y = 2
public class Temp { private string a = ""; private string b = ""; private string c = ""; private string d = ""; public string A { get { return a; } set { a = value; } } ............... }Temp.A = "111";//赋值 string a = Temp.A;//取值
{
public int x, y;
}
Point myPoint = new Point();
a=myPoint.x;
b=myPoint.y;
Public x As Integer
Public y As Integer
End Structure Dim mypoints As points = New points
mypoints.x = 1
mypoints.y = 2
{
private string a = "";
private string b = "";
private string c = "";
private string d = "";
public string A
{
get
{
return a;
}
set
{
a = value;
}
}
...............
}Temp.A = "111";//赋值
string a = Temp.A;//取值
------------------------------------
我的团队:www.51team.com欢迎访问,有志者共谋事,每天都有惊喜,SOHO
------------------------------------
我的团队:www.51team.com欢迎访问,有志者共谋事,每天都有惊喜,SOHO