Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


Archive for November, 2009

How many types of exception handlers are there in .NET ?


The exception information table represents four types of exception handlers for protected blocks:

  • A finally handler that executes whenever the block exits, whether that occurs by normal control flow or by an unhandled exception.
  • A fault handler that must execute if an exception occurs, but does not execute on completion of normal control flow.
  • A type-filtered handler that handles any exception of a specified class or any of its derived classes.
  • A user-filtered handler that runs user-specified code to determine whether the exception should be handled by the associated handler or should be passed to the next protected block.

How the Runtime Manages Exceptions ?


The runtime uses an exception handling model based on exception objects and protected blocks of code. An Exception object is created to represent an exception when it occurs.

The runtime creates an exception information table for each executable. Each method of the executable has an associated array of exception handling information (which can be empty) in the exception information table. Each entry in the array describes a protected block of code, any exception filters associated with that code, and any exception handlers (catch statements). This exception table is extremely efficient and there is no performance penalty in processor time or in memory use when an exception does not occur. You use resources only when an exception occurs.

 

What is an Exceptions?


We code to make the program perfect and Error free; eventhough there is a chance of errors. All .NET Framework operations indicate failure by throwing exceptions.

An exception is any error condition or unexpected behavior encountered by an executing program. Exceptions can be raised because of a fault in your code or in code you call (such as a shared library), unavailable operating system resources, unexpected conditions the common language runtime encounters (such as code that cannot be verified), and so on.

In the .NET Framework, an exception is an object that inherits from the Exception Class class. An exception is thrown from an area of code where a problem has occurred. The exception is passed up the stack until the application handles it or the program terminates.

 

Finding Similar Words (like bat, cat, mat)using regular expressions with .net


Finding Similar Words (like bat, cat, mat)using regular expressions with .net

In this regular expression we are going to find out Similar Words like bat, cat, mat, and rat. Just take a look at above words they all same ending "at".

Regular Expression Pattern

\b[a-zA-Z](at\b)

A description of the regular expression:

First or last character in a word
Any character in this class: [a-zA-Z]
[1]: A numbered capture group. [at\b]
at\b
at
First or last character in a word


Read the rest of this entry »

Getting Started with C# Object-Oriented Programming


Getting Started with C# Object-Oriented Programming

C# is a powerful and flexible programming language provides several features. Like all programming languages, it can be used to create a variety of applications. C# is an object-oriented programming language developed by Microsoft as part of the .NET Visual Studio and later approved as a standard by ECMA and ISO.

Object-oriented programming (OOP) introduced the concept of classes and objects in the early ’90s. In 1962 "SIMULA 1" and in 1967 " SIMULA 67" used the concept of Object-oriented programming and these are the two earliest object – oriented languages. Even though most of the advantages of OOP were available in the earlier Simula languages, it wasn’t popular till the evolution of C++. The C++ is a very powerful object oriented language; it is in fact a mixture of both methodologies, the traditional and OOP approaches. However, with that power comes with a lot of complexity. Language developers wanted a simpler and perhaps less complex language for OOP development.


Read the rest of this entry »