Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shared struct
Message
De
13/07/2005 10:07:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/07/2005 10:03:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01032193
Message ID:
01032211
Vues:
16
>Hilmar,
>A struct is a value type. You could directly pass it as any value type (ie: int). Do you mean pass by reference? Then use ref or out.
>
>A struct by itself is like a class (with some differences). IOW define it as if you're defining another class.

OK, thanks.

The problem wasn't passing by reference or value - I couldn't pass it at all. Defining the struct separately in two forms wasn't acceptable to the compiler. I wasn't sure where I had to define it, but now I managed it - in a separate file.

>
>
>namespace myApp
>{
>class myForm1 {}
>class myForm2 {}
>struct myStruct {}
>}
>
Cetin
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform