C# Advance

C# Catch All Exceptions

In C# all types of exceptions can be caught at once by defining a catch block without specifying any exception type and exception reference variable, that catch block is called as catch-all. Remember the catch-all block must be defined last in other catch blocks.

Posted in: C# Advance, C#.NET

C# Throwing Exceptions Manually

Until now the all exceptions were generated/throwing automatically by the run-time system because by default the C# compiler C.L.R throws or generated different types of run-time exceptions automatically. In C# we can throw the different exceptions manually by using a keyword throw. Since all exceptions are built-in in C# and these exceptions are classes which […]

Posted in: C# Advance, C#.NET

C# Re-throwing Exceptions

The C# exceptions are always caught by the different types of catch handlers but some times that handled exceptions can be Re-throwing/re-generated manually. When an exception is re-thrown then it can be caught by another or outer catch clause. By re-thrown an exception the C# allows to multiple catch handlers to handle the same exception […]

Posted in: C# Advance, C#.NET

C# Nested Try And Catch Blocks

In C# one try block can contains another try block which is called nested try blocks. Exception of an inner try block is handled by its inner catch block and exception of an outer try block is handled by its outer catch block. If an exception is occurred in an outer try block then the […]

Posted in: C# Advance, C#.NET

C# Exception Classes

C# defines several built-in exceptions, actually these exceptions are classes which inherits System.SystemException class (directly or indirectly). The System.SystemException class inherits an System.Exception class which is a base class for all built-in exception classes or in other words all built-in exceptions are derived from an System.Exception class. When run-time errors occur the CLR (common language […]

Posted in: C# Advance, C#.NET

Creating Custom Exceptions In C#

The C# provides several built-in exception types which are system level exceptions. These exceptions are generated/thrown by C# run-time system and also handled automatically by C.L.R (common language run-time compiler). Like C#’s system level built-in exceptions we can also generate/throw our own custom exceptions in our programs and handle/catch them by our own custom classes. […]

Posted in: C# Advance, C#.NET

C# Catch Multiple Class Custom Exceptions

Through our own exception classes, base and derived or multiple class’s exceptions can be handled in our single class. C# provides a rule for handle the multiple custom exceptions generated by base and derived classes, that rule is: A most inner exception derived class must be put first in the catch block sequences and a […]

Posted in: C# Advance, C#.NET

C# Boxing And Unboxing

In C# the object class is a parent/base class of all data types including value types such as int, double, char etc. All data types are derived from Object class implicitly or automatically so the reference of the Object class can refers to any type including value types. When Object class reference variable refers to […]

Posted in: C# Advance, C#.NET
Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .