C#
  Home arrow C# arrow C++ Classes Vs. C# Classes
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

C++ Classes Vs. C# Classes
By: Jordan Leverington
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 31
    2002-01-22

    Table of Contents:
  • C++ Classes Vs. C# Classes
  • How have classes changed?
  • Limiting access to classes with class modifiers
  • Virtual functions in C and C#
  • Polymorphism in C and C#
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    C++ Classes Vs. C# Classes


    (Page 1 of 6 )

    With its implementation of C#, Microsoft have given way to some of C++'s nitty-gritty object-orientated features such as templates, and have also changed the way we create classes. In this article, Jordan compares and contrasts classes in both C++ and C#. He focuses on demonstrating how Microsoft has changed certain aspects of creating and using classes in C# including reference types, virtual functions and polymorphism.

    Object-orientated programming has taken us a long way in terms of application design and development in the last twenty or so years. A program is no longer thought of as a series of functions, which are executed in sequence (like in the procedural programming paradigm), but rather as a set of objects where each object exposes certain properties and methods allowing it to interact with other objects.

    The "C" series of languages is a great example of how Object-orientated design disciplines have evolved over time. C++ provides developers with an excellent implementation of object-orientated programming, allowing them to explicitly create constructors, copy constructors, override operators, use templates, etc.

    The main problem with a complex language like C++ is that it takes several months to truly master its object-orientated design nature, with each new programmer having to come to grips with templates, function overloading and of course sensible class creation and usage.

    With its implementation of C# (pronounced C-Sharp), Microsoft have given way to some of C++’s nitty-gritty object-orientated features such as templates, and have also changed the way we create classes. In this article, I'm going to compare and contrast classes in both C++ and C#. I will also focus on demonstrating how Microsoft has changed certain aspects of creating and using classes in C#.

    This article was written for fluent C++ programmers looking for some common ground when trying to learn C# and its object-orientated capabilities from scratch.

    More C# Articles
    More By Jordan Leverington


       · if we don't specify any access modifier to a class then it is internal by default...
     

    C# ARTICLES

    - Introduction to Objects and Classes in C#, P...
    - Visual C#.NET, Part 1: Introduction to Progr...
    - C# - An Introduction
    - Hotmail Exposed: Access Hotmail using C#
    - Razor Sharp C#
    - Introduction to Objects and Classes in C#
    - Making Your Code CLS Compliant
    - Programming with MySQL and .NET Technologies
    - Socket Programming in C# - Part II
    - Socket Programming in C# - Part I
    - Creational Patterns in C#
    - Type Conversions
    - Creating Custom Delegates and Events in C#
    - Inheritance and Polymorphism
    - Understanding Properties in C#







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway