C# Reference - C# Constructors - Class and Struct Constructors - C# Reference - C# Constructors - Class and Struct Constructors
The LBTT Spot
"Lifeline is focused on developing and marketing systems designed to assist in the early detection of breast and ovarian cancer."



C# Reference - C# Constructors - Class and Struct Constructors

View C# Source Code

Article Categories:

.Net Framework
.Net Framework 1.1
ADO.NET
ASP.NET
Assemblies
Asynchronous Methods
C#
Collections
Configuration
Delegates
Events
Pocket PC
Regular Expressions
Smart Devices
SQL Server
Visual C#
Visual Studio .NET
Visual Studio .NET 2003
Windows Forms
XML

C# .Net Fun Menu

View Current Page's ASP.NET Source Code
C# Reference
C# Study Flash Cards
Valuable Links
Contact Us
Site Map
Mike's Portfolio

C# Reference Search:

Full Text Search:

Articles by Author:

Code Examples (zipped):

C# Reference
      C# Constructors
           Class and Struct Constructors


  • C# Constructors: [Class and Struct Constructors] Reference from Microsoft®


  • A constructor is a method that is invoked upon instantiation of a type (class or struct).

    Note: Structs can have constructors ONLY if the the method signature contains parameters.

    public class myClass { // a constructor method has the same name as that of the class containing it // constructors have no return types public myClass() { } } // struct example public struct myStruct { public myStruct(String[] args) { } }