Class Vs Structure in program design ..
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Class Vs Structure in program design ..

Hybrid View

  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    126

    Class Vs Structure in program design ..

    I am converting my old C project to c# project to explore the language.

    My C program is a viewer , which reads a file and displays Data and parameters in different formats and print them .

    I have used plenty of structures in my c code.

    Now should I convert them to classes and use ?

    or

    I should define a class and use structures inside ?

    pl guide ..

    Thanking you ..

  2. #2
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,000

    Re: Class Vs Structure in program design ..

    tl;dr version: probably classes, unless you have a good reason to choose structs.

    Longer version, you'll probably want to read about the differences: http://msdn.microsoft.com/en-us/libr...=vs.71%29.aspx
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Jan 2012
    Location
    India
    Posts
    126

    Re: Class Vs Structure in program design ..

    Thank u BiophysEngr Sir ,

    I will difinately go for classes . I am just thinking for the best possible way to design the program.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center