Pages

Friday, 27 July 2012

Displaying MessageBox

Drag a button control into the form.Change its text property as CLICK ME(text property changed by using properties window.) .Double click the button to view the code editor window.
Put the following code inside the button click event.
                              MessageBox.Show("Welcome to C#");
If you want to customize the message box

              MessageBox.Show("Welcome to C#","Message",MessageBoxButtons.OKCancel ,MessageBoxIcon.Information   );
 

Wednesday, 25 July 2012

Windows Application

For creating .Net Applications first of all we want VS 2010 or another versions.After installing VS 2010 go to start->All Programs->Microsoft Visual Studio 2010->Microsoft Visual Studio 2010.Now you will get a window-that's the start page.

Fig1.Start Page
Go to File->New->Project.From the New Project Dialog box select Visual C# as language and select Windows Forms Application.Change the Name to My Proj1 then click OK as shown below.
Fig2. New Project DialogBox

  will get
This is Windows Form Designer,allows you to add controls to a form,arrange them,and write code for their events.

Tuesday, 24 July 2012

Introduction


The .NET Framework is an application development platform that provides services for building, deploying, and running desktop, web, and phone applications and web services. It consists of two major components: the common language runtime (CLR )and .Net Framework Base class library.

The .NET Framework provides the following services

Memory management-    In many programming languages, programmers are responsible for allocating and releasing memory and for handling object lifetimes.
A common type system-  In the .NET Framework, basic types are defined by the .NET Framework type system and are common to all languages that target the .NET Framework.
An extensive class library- Instead of having to write vast amounts of code to handle common low-level programming operations, programmers can use a readily accessible library of types and their members from the .NET Framework Class Library.
Language interoperability- With this feature, routines written in one language are accessible to other languages, and programmers can focus on creating applications in their preferred language or languages.

You can choose any programming language that supports the .NET Framework to create your application. Because the .NET Framework provides language independence and interoperability, you can interact with other .NET Framework applications and components regardless of the language with which they were developed.In this blog we discuss with application development using C#.

Common Language Runtime

The .NET Framework provides a run-time environment called the common language runtime, which runs the code and provides services that make the development process easier.Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services. 

Managed Execution Process
The managed execution process includes the following steps:
  1. Choosing a compiler. To obtain the benefits provided by the common language runtime, you must use one or more language compilers that target the runtime.
  2. Compiling your code to Microsoft intermediate language (MSIL). Compiling translates your source code into MSIL and generates the required metadata.
  3. Compiling MSIL to native code. At execution time, a just-in-time (JIT) compiler translates the MSIL into native code. During this compilation, code must pass a verification process that examines the MSIL and metadata to find out whether the code can be determined to be type safe.
  4. Executing your code. The common language runtime provides the infrastructure that enables execution to take place as well as a variety of services that can be used during execution.

Class Library

The .NET Framework class library is a library of classes, interfaces, and value types that are included in the Microsoft .NET Framework SDK. This library provides access to system functionality and is designed to be the foundation on which .NET Framework applications, components, and controls are built.