Saturday 24 September 2016

C sharp introduction-2 oops concepts




Applications written in c# requires the .NET framework to be installed to run the application.
C# does not  offer global variables or function. Every think is wrapped in the classes.


Encapsulation:

Binding code and data together into a single unit is known as encapsulation. Take a  television  to watch the programs on tv users should only do the action like on, off or mute etc .But internal details of electricity circuit are hidden from the user. It is called encapsulation. That means end users should only call the methods to work with data. Data should not be directly handles from the end user.

Abstraction:

Hiding internal details and focusing only essential functionality is known as abstraction .For example  to create  student class there may be many properties but we focus only on student no, sname, mark etc.

Inheritance:

When one object acquires all the properties and behaviors of parent objects is known as inheritance.
Inheritance is the mechanism by which one object requires some/all properties of another object.

Polymorphism: 

1.       Polymorphism means to process objects differently based on their type.
2.       Multiple methods can have same name but which implementation to be used is decided at runtime depending upon  the situation.

o.k oops concepts over. But note one thing c# is called as component oriented application .

what is component oriented language?
A software is divided in to no of component is developed and then joined. For example we know that there is a spell checker in Ms-word. It is a separate component developed separately and made  to work with ms-word .In available languages  c# is the best component oriented language.
                                                          -will continue(Muthu karthikeyan)

Friday 23 September 2016

c sharp introduction-1



What is c# pronunciation?

C sharp

Which company is it belongs  to?

Micro soft

What is speciality of csharp?

The first thing is it is object oriented language and it is also called as component oriented language. It combines the computing power of c++ with the programming ease of visual Basic. C# is designed to work with  Microsoft .NET(pronounced as Dot Net)

What is object oriented programming?

Object oriented programming(oop) refers to a type of computer programming in which programming defines not only the data type of a data structure. but also the types operations (Functions also called as mehods) that can  be applied to the data structure. so the data structure becomes  an object that includes both data and functions . programmer can also create relationship between data and functions.
What are the important topics in object oriented programming?
 

Class.
Object
Encapsulation
Abstraction
Inheritance.
Polymorphism

What is a class?

It is a collection of objects having similar properties are  Attributes of an object .Events are the actions done by user on object.class ‘s data is represented by its fields and behavior is represented by its methods

Why we need to create objects?

Class is just a template .It can be also compared with blueprint of a building. We need to create objects using this template  just as buildings arebbuilt by using blue print.

-------will   continue(Muthu karthikeyan,madurai)

Sunday 18 September 2016

How .net program is executed by differently from other languages?




Why the assembly is used?


If we want to execute c++ or vb programs first we compile the program. Result is an assembly file. Extension of file depend upon the type of program. it may be .dll or exe. Actually why should we use assembly?. Because our operating system can not understand high level languages. we have to converted in to machine code  which is only 0 or 1.that is what assembly contains

What happens in case .of java?


In java files are not compiled into machine code. That is converted into class files. It will not be in  human readable form. it is because java is platform independent .The JVM(java virtual machine) responsible for execution is different for every platform. So JVM interpret class files of java and run it.

What is the Usage of CLR?


   In .net we can run c#, vb.net, c++,  j# ext. like JVM in java there is CLR (Common Language runtime)which manages the program running. Also it takes care for memory management. For example when we create object for a class. In language like c++ it allocates memory. But even after finishing the execution of program the memory is not freed. we have to manually write destructors for freeing memory. But in case of .NET there is a garbage collector which runs when we run the program it frees the memory by objects not in use. Even garbage collector can be manually called. But it is not a good programming practice.

Before entering in CLR the program(written in languages like c#,vb.net,c++ or,j#) are first compiled in to assembly but is not any machine code or class files. It is intermediate language that assembly contains. somebody calls itself as MSIL(Microsoft intermediate language. Others calls it as  CIL(common intermediate language. During the execution of program MSIL enters into CLR which contains JIT(Just IN time Compiler). It translates assembly code in to native machine code .and then executes the program.

What is the extension of Assembly file?


Assembly file extension may be .dll or .exe. For example when we build windows application .exe file get generated. But in case of class library or web application .dll file get generated. Main advantage of using CLR is it is portable.  Machine code generated by JIT compiler depends upon which underlying OS(operating system) it is going to run. And MSIL is also called Managed code. CLR managing code of the assembly code so it is called managed code.

What happens to code generated by CLR after stopping the execution of program?


And after stopping the execution of a program the code generated by CLR get deleted. While all other languages are managed code ,the code of c++ is available as both Managed and unmanaged code. the reason is c++ programs have to be backward compatibility for projects already created before inventing .NET.I think you would know about visual c++ language one of the component  of visual studio 6.0.







Saturday 17 September 2016

.NET INTRODUCTION

what  is .NET?

.NET is a software development platform created by Microsoft.you can write programs in any language and run it in  visual studio.Net. it is just opposite to what oracle company's java said.actually you can write a program in java compile it or run it in any platform. microsoft's intention for developing .net is to catch the market of java.
What are the two parts of .NET frameworks consists of?
  1. frame work class library(FCL)
  2. common language run time.(CLR)
What is FCL?

FCL  is a collection of ready made classes that can be used for commonly needed programming tasks.
It is used while creating software in area of
  1. Graphics
  2. Multimedia
  3. Net working
  4. Internet
  5. Mobile computing
  6. Web applications

what is CLR?

CLR is responsible for  execution of programs. It is responsible for handling memory and provides security while executing a program.

Do you know about MSIL?

You first have to know about .NET  is not limited one we can run programs written in different languages.
How can a compiler can know about commands written in different languages. Any program which ever language it has been written it can be converted in intermediate language called as Microsoft intermediate language(MSIL). After that MSIL is compiled into machine language.

What is  language interoperability?

why should we convert c# or vb programs into MSIL instead of directly compile in to machine language.
good question ?
here the language interoperability come.This means that different parts  of same software can be written in any .NET compliant languages (like c#,vb.net,vc++.) even after that   we can compile the software in to common executable programs

--------will continue




WELCOME NOTICE.

I welcomes you in to the world of Dot net.you can learn here any topics in Dot Net .my aim of starting this new blog Dotnet world is educating the students who are eager in learning dot net technology but due to the complexity of learning materials they got strucked.
And my aim  to teach the dotnet is   how simply it can be taught.