Attributes in C#

Share this…Facebook0TwitterLinkedinPrint Post Views: 412 Attributes in C#:- Types, members, and other entities in a C# program support modifiers that control certain aspects of their behavior. For example, the accessibility of a method is controlled using the public, protected, internal, and private modifiers. C# generalizes this capability such that user-defined types of declarative information can […]

Enums in C#

Share this…Facebook0TwitterLinkedinPrint Post Views: 408 Enums in C#:- An enum type is a distinct value type with a set of named constants. The following example declares and uses an enum type named Color with three constant values, Red, Green, and Blue. using System; enum Color { Red, Green, Blue } class Test { static void […]

Interface in C#

Share this…Facebook0TwitterLinkedinPrint Post Views: 451 Interface in C#: An interface defines a contract that can be implemented by classes and structs. An interface can contain methods, properties, events, and indexers. An interface does not provide implementations of the members it defines—it merely specifies the members that must be supplied by classes or structs that implement […]

Other function members in C-SHARP

Share this…Facebook0TwitterLinkedinPrint Post Views: 305 Other function members in C-SHARP:- Members that contain executable code are collectively known as the function members of a class. The preceding section describes methods, which are the primary kind of function members. This section describes the other kinds of function members supported by C#: constructors, properties, indexers, events, operators, […]

Method overloading in C-SHARP

Share this…Facebook0TwitterLinkedinPrint Post Views: 304 Method overloading permits multiple methods in the same class to have the same name as long as they have unique signatures. When compiling an invocation of an overloaded method, the compiler uses overload resolution to determine the specific method to invoke. Overload resolution finds the one method that best matches […]