Vous êtes sur la page 1sur 31

INTRODUTION TO .

NET
CLASS & OBJECT
ABSTRACT CLASS

.NET
Microsoft visual studio .net is a technology
and it contains controls, solution explorer and
properties.
Front end and back end communication is a
package.
It has the ability to quick building and
intelligent system.
1990 next generation windows services
2000 - .NET framework(rename)
It is a collection of services and classes.
It is a underlying layer between operating
system and application.
Do not support pointer.
1.0 - .NET framework
1.1 - .NET 2003
2.0 - .NET 2003
3.0 .NET 2005
3.5 .NET 2008
4.0 - .NET 2010
4.5- .NET 2012
Windows application
Web application
Console application
Desktop application
Forms are like vb
It contains controls
Asp.net
To create dynamic web page
Server-side programming
GUI-graphical user interface
Character-user-interface.
Command promt.
CLR(common language runtime)
Class library
It has the environment called managed
code.
Every language has runtime, instead of
that .net has CLR.
It is used to manage the execution of the
code.
CTS(common type system)
CLS(common language specification)
JIT(just in time)
It is used for communicate with other
languages.
In vb, having int and in c++ having long, in
one case they are not compatible with
each other in that case cts plays role with
Using System.int32.
It defines how data types are declared,
used and managed in runtime.
It has a set of features have in common.
It is a subset of CTS
JIT compiler is used to convert machine
code to native code.
CLR supplies a JIT compiler for each
supported cpu architecture , so developers
can write set of MSIL can be JIT compiled
and run on computers.
Reusable of code.
Object oriented nature at a runtime.
With the help of namespace class library is
executed.
Logical group of related classes and
interfaces.
It is used to reduce the naming confusions.
IMPORTS is the keyword for vb.net.
Using is the keyword for c#.
Dim a as integer

Dim - statement
A - variable
As - clause
Integer - datatype


Class are user defined data type.
Its contains collection of object.
It like built in types of a program
language.
A group of object same behaviors.



Object are basic real time entities in an
object oriented.
It is anything that really exist the world.
It is a instant of class.




ACESS SPECIFIER CLASS USERDEFINE
CLASSNAME

END CLASS

ACCESS SPECIFIER CLASS CLASSNAME

DIM OBJECTNAME AS NEW CLASSNAME()

END CLASS
Public Class Form1
Dim ad As New add()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim a, b As Integer
a = TextBox1.Text
b = TextBox2.Text
ad.show(a, b)
End Sub
End Class
Public Class add
Public Sub show(ByVal a As Integer, ByVal b As Integer)
Dim c As Integer
c = a + b
Form1.TextBox3.Text = c
End Sub

End Class
Public Class Form1
Dim d As New demo()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b As Integer
a = d.sum(3, 4)
b = d.subtract(4, 2)
TextBox1.Text = a
TextBox2.Text = b
End Sub
End Class



Public MustInherit Class sample
Public MustOverride Function sum(ByVal a As Integer, ByVal b As
Integer)
Public MustOverride Function subtract(ByVal a As Integer, ByVal b As
Integer)
End Class
Public Class demo
Inherits sample

Public Overrides Function sum(ByVal a As Integer, ByVal b As Integer)
As Object
Return a + b
End Function

Public Overrides Function subtract(ByVal a As Integer, ByVal b As
Integer) As Object
Return a - b
End Function
End Class

Vous aimerez peut-être aussi