C
Cybertof
Hello,
I would like to understand the difference between declaring a
structure/variable in a class body, and doing the same thing in a
procedure body.
Example :
In the following code, what are the differences between mCustomer1 &
mCustomer2 ?
class MyClass
{
struct CustomerStruct
{
public string sName;
public string sPhone;
}
CustomerStruct mCustomer1;
public void Test()
{
CustomerStruct mCustomer2;
mCustomer1.sName="John";
mCustomer2.sName="Arnold";
mCustomer1.sPhone="111";
mCustomer2.sPhone="222";
// What are the differences between the 2 structure
// variables ?
}
}
Regards,
Cybertof.
I would like to understand the difference between declaring a
structure/variable in a class body, and doing the same thing in a
procedure body.
Example :
In the following code, what are the differences between mCustomer1 &
mCustomer2 ?
class MyClass
{
struct CustomerStruct
{
public string sName;
public string sPhone;
}
CustomerStruct mCustomer1;
public void Test()
{
CustomerStruct mCustomer2;
mCustomer1.sName="John";
mCustomer2.sName="Arnold";
mCustomer1.sPhone="111";
mCustomer2.sPhone="222";
// What are the differences between the 2 structure
// variables ?
}
}
Regards,
Cybertof.