exception handling in c#

Exception Handling in c#-: Exception handling allows programmers to deal with unexpected situations that may occur in programs.As an example, consider opening a file using the StreamReader class in the System.IO namespace. To see what kinds of exceptions this class may throw, we can hover the cursor over the class name in Visual Studio. For instance, … Read more

Exceptions in C#

Exception -: Exception handling helps applications trap and respond in a predictable and robust manner to exceptional events. This enhances the correctness of an application, which naturally improves customer satisfaction. Exception handling is an important ingredient of a robust application, but it is often an afterthought. We should proactively consider exception handling as an integral part … Read more

delegates in c# programming

Delegates in c# programming-: A delegate is a type used to reference a method. This allows methods to be assigned to variables and passed as arguments. The delegate’s declaration specifies the method signature to which objects of the delegate type can refer. Delegates are by convention named with each word initially capitalized, followed by Delegate … Read more

enum in c#

Enum in c# programming language-: An enumeration is a special kind of value type consisting of a list of named constants. To create one,we can use the enum keyword followed by a name and a code block containing a comma-separated list of constant elements. enum State { Run, Wait, Stop }; This enumeration type can be … Read more

interface in c#

Interface in C# Language-: An interface defines a contract. A class or struct that implements an interface must adhere to its contract. An interface may inherit from multiple base interfaces, and a class or struct may implement multiple interfaces.   in other words we can say that the An interface is used to specify members that deriving … Read more

arrays in c#

Arrays in c# programming language-:  An array is a data structure used for storing a collection of values that all have the same data type.An array is a data structure that contains a number of variables that are accessed through computed indices. The variables contained in an array, also called the elements of the array, are … Read more

control statements in c#

Control Statements in C#-:  C# provides a variety of statements. Most of these statements will be familiar to developers who have programmed in C and C++. C# provide following statement-: 1     labeled-statement 2     declaration-statement 3      embedded-statement-: In the c# embedded statement has many types as like block empty-statement expression-statement selection-statement iteration-statement … Read more

classes in c# programming

Class in C# Language-: A class is a data structure that may contain data members (constants and fields), function members (methods, properties, events, indexers, operators, instance constructors, destructors, and static constructors), and nested types. Class types support inheritance, a mechanism whereby a derived class can extend and specialize a base class. Class Declarations -:  A class declaration … Read more

operators in c#

Operators in c# programming -:The operators of an expression indicate which operations to apply to the operands. Examples of operators include +, -, *, /, and new. Examples of operands include literals, fields, local variables, and expressions. In the c# programming language has three types operators Unary operators. -:The unary operators take one operand and use … Read more

variable in c# language

Variable in C# Language-: Like any other programming language c#  also support many variable.Variables represent storage locations. Every variable has a type that determines what values can be stored in the variable. C# is a type-safe language, and the C# compiler guarantees that values stored in variables are always of the appropriate type. The value … Read more