Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
GeneralRe: Umm.. Stupid Question Pin
Rocky Moore21-Jul-03 21:48
Rocky Moore21-Jul-03 21:48 
GeneralRe: Umm.. Stupid Question Pin
Nick Parker21-Jul-03 17:14
protectorNick Parker21-Jul-03 17:14 
GeneralRe: Umm.. Stupid Question Pin
J. Dunlap21-Jul-03 17:44
J. Dunlap21-Jul-03 17:44 
GeneralRe: Umm.. Stupid Question Pin
Kannan Kalyanaraman21-Jul-03 19:32
Kannan Kalyanaraman21-Jul-03 19:32 
GeneralRe: Umm.. Stupid Question Pin
James T. Johnson21-Jul-03 19:38
James T. Johnson21-Jul-03 19:38 
GeneralRe: Umm.. Stupid Question Pin
Kannan Kalyanaraman21-Jul-03 20:08
Kannan Kalyanaraman21-Jul-03 20:08 
GeneralPrinting a DataGrid Pin
Mike Osbahr21-Jul-03 11:42
Mike Osbahr21-Jul-03 11:42 
GeneralRecord Types Pin
dbetting21-Jul-03 11:28
dbetting21-Jul-03 11:28 
I've been through several books on C# and its data types but I haven't found how to create records. If I have a definitions/classes where I'm trying to define addresses, everything about addresses is consistent between a shipping address, personal address, billing address, etc.

Please bear with the example and qualify/disqualify my understanding since I am converting from Delphi/Pascal.

My understanding of the C# implementation says I can't do something like (Delphi/Pascal structure):
Type TAddress = Record
AddressID : Integer;
Address : String;
City : String;
State : String;
ZipCode : String;
Country : String;
end; {TAddress}

and then define the variables:
private string PersonName;
private TAddress PersonAddress;

The impression is that I must create a class called TAddress with each field being a property that has a Set and Get attribute. Is this the case? I cannot create a new datatype without it being a class?

Along those same lines, if I want a "Globals" or "Constants" file, I would need to create a class and define each Global/Constant as a public variable. Are there pros/cons between creating a them as public variables verses as properties with a Get.

Thanks.
GeneralRe: Record Types Pin
David Stone21-Jul-03 13:44
sitebuilderDavid Stone21-Jul-03 13:44 
GeneralRe: Record Types Pin
Ista21-Jul-03 17:10
Ista21-Jul-03 17:10 
GeneralRe: Record Types Pin
dbetting22-Jul-03 2:47
dbetting22-Jul-03 2:47 
GeneralEncapsulating Database in custom class Pin
sandman_max21-Jul-03 11:15
sandman_max21-Jul-03 11:15 
GeneralRe: Encapsulating Database in custom class Pin
Rocky Moore21-Jul-03 17:10
Rocky Moore21-Jul-03 17:10 
GeneralRe: Encapsulating Database in custom class Pin
sandman_max22-Jul-03 4:43
sandman_max22-Jul-03 4:43 
GeneralListView getting the Selected Item Pin
albean21-Jul-03 9:36
albean21-Jul-03 9:36 
GeneralRe: ListView getting the Selected Item Pin
draco_iii21-Jul-03 9:39
draco_iii21-Jul-03 9:39 
GeneralRe: ListView getting the Selected Item Pin
albean21-Jul-03 11:05
albean21-Jul-03 11:05 
GeneralRe: ListView getting the Selected Item Pin
David Stone21-Jul-03 13:47
sitebuilderDavid Stone21-Jul-03 13:47 
GeneralDatatables and XML Pin
draco_iii21-Jul-03 9:32
draco_iii21-Jul-03 9:32 
GeneralRe: Datatables and XML Pin
Ista21-Jul-03 17:11
Ista21-Jul-03 17:11 
GeneralDisplaying Version and Build info in my program. Pin
frogb0x21-Jul-03 9:21
frogb0x21-Jul-03 9:21 
GeneralRe: Displaying Version and Build info in my program. Pin
Anonymous21-Jul-03 10:42
Anonymous21-Jul-03 10:42 
GeneralRe: Displaying Version and Build info in my program. Pin
frogb0x21-Jul-03 10:45
frogb0x21-Jul-03 10:45 
GeneralRe: Displaying Version and Build info in my program. Pin
sandman_max21-Jul-03 11:07
sandman_max21-Jul-03 11:07 
GeneralData source/Display memeber works but data binding doesnt Pin
Anonymous21-Jul-03 8:11
Anonymous21-Jul-03 8:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.