-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: pppp
Message 3 in Discussion

Yes you can do that :

The keyword struct can be used to declare a structure. The general form of a structure 
declaration in C# is as follows.          

For example  

          struct MyStruct
            {
                        public int x;
                        public int y;
            }  

The objects of a strcut can be created by using the new operator as follows.  

          MyStruct ms = new MyStruct();  

The individual members of a struct can be accessed by using the dot (.) operator as 
showing below.          

          ms.x = 10;
            ms.y = 20;  

Remember that unlike classes, the strcut object can also be created without using the 
new operator.  

          MyStruct ms;          

But in this case all fields of the struct will remain unassigned and the object can�t 
be used until all of the fields are initialized.  

one more thing:

A C# struct can declare constrcutor, but they must take parameters. A default 
constructor (constructor without any parameters) are always provided to initialize the 
struct fields to their default values.

Regards
Pinto

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to