Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2006

Tip: Looking for answers? Try searching our database.

Which template should I use for classes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juliano.net - 29 May 2006 23:56 GMT
I'm developing a program that I want to be Object Oriented, so I've
opened the Add New File dialog, and there I found "Component Class" and
"Installer Class", which of them should I use to create the classes for
my program logic?
Bruno van Dooren - 30 May 2006 06:24 GMT
> I'm developing a program that I want to be Object Oriented, so I've
> opened the Add New File dialog, and there I found "Component Class" and
> "Installer Class", which of them should I use to create the classes for
> my program logic?

none of those for a simple class.
select 'add class' then select the C++ tab and add a C++ class. you can
choose between Managed (.NET) and plain C++.
that will generate the header and source files for your class.

if you are using 'add new file' you can add a new header file and cpp file
and then create the class declaration and implementation yourself, but the
end result will be the same. I just mention this to show that there is
nothing inherently different between adding a class manually and using the
wizard.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"

Ben Voigt - 30 May 2006 17:14 GMT
>> I'm developing a program that I want to be Object Oriented, so I've
>> opened the Add New File dialog, and there I found "Component Class" and
[quoted text clipped - 5 lines]
> choose between Managed (.NET) and plain C++.
> that will generate the header and source files for your class.

That's what I do as well, however going the "Component Class" route doesn't
add much extra code at all (about 6 lines) and it lets you add the resulting
class to your forms and set the properties and event handlers using the
designer... so you may consider that for public classes.

> if you are using 'add new file' you can add a new header file and cpp file
> and then create the class declaration and implementation yourself, but the
> end result will be the same. I just mention this to show that there is
> nothing inherently different between adding a class manually and using the
> wizard.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.