Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

.

NET Features


It’s a IDE(Integrated Development Environment)

.NET Framework provide a way of quickly developing the
Applications.

CLS ( Common Language Specification)

CTS ( Common Type system)

Language Interoperability

Memory Allocation-avoid memory leaks.

Auto completion, Intellisense , Exception Handling

There are Two Main Components in .NET Framework

CLR(Common Language Runtime)

Large No of Class Library
Dot Net: Practical & Project Guide Design and Develop by A.Andrew Bergeran M.Sc(ct),M.B.A (sys)
Process of Execution

Source code -> IL(intermediate code) = compilation

-> CLR (JIT) -> Native code = Runtime

JIT- Just in Time using Dynamic Compilation

.NET Framework Versions

1.0 .Net

1.1 .Net 2003

2.0 .Net 2005

3.0 .Net 2005

3.5 .Net 2008

4.0 .Net 2010

4.5 .Net 2012

Dot Net: Practical & Project Guide


.NET Projects and Applications

Visual Basic You Choose Any Programming Language

Visual C#

Visual J#

Visual C++

Setup and Deployment

But, These are Important Applications

1) Console Apps ( Command-Line Application. It’s Like C, C++, Java)

2) Window Apps ( VB . NET Windows-user Interface using VB or C# )

3) Web Apps ( ASP . NET Website using VB or C# )

4) Device Apps ( Mobile Software )

5) Crystal Apps ( Report Preparation )

6) Class Library Apps ( Create DLL. It means Dynamic Link Library (.dll) )

7) Control Library Apps (Create your Own Controls in Window


Dot Net:& Web Apps)
Practical & Project Guide
Create a New Project

Program Location
Dot Net: Practical & Project Guide
Console Application Ex: 1

Module Module1
 
Sub Main ()
  Console.WriteLine (“Welcome") ‘Write Statement
End Sub
 
End Module

Run your Application Press: Ctrl F5

Dot Net: Practical & Project Guide


Data Types:
Boolean,Byte,Char,date,decimal,double,integer,long,object,short,String
Declaration:
Dim a ,b As integer
Dim na As char
Dim nam As string
Dim si As decimal
Operators:
Arithmetic Operators :+-/*
Relational operators : != == < <= > >=
Logical operators : And or not xor
Concatenation operators: & +

Dot Net: Practical & Project Guide


Ex: 2

Imports System.Math ‘ System Namespace


Module Module1
 
Sub Main ()
Dim x As Integer
x = Sqrt(16) ‘Math function
Console.WriteLine("Ans = " & x)
End Sub
 
End Module

Dot Net: Practical & Project Guide


Module Module1 Ex: 3
 
Sub Main ()
Dim a, b, c As Integer
Console.WriteLine("Enter A") ‘Write Statement (or) a=5
a = Console.ReadLine ‘Read Statement b=5
Console.WriteLine("B“)
b = Console.ReadLine ‘Read Statement
c=a+b
Console.WriteLine("add=" & c)
End Sub
 
End Module

Dot Net: Practical & Project Guide


Ex: 4
Imports System.Math
Module Module1
 
Sub Main ()

Dim a, b, tot, avg As Decimal


a = 11.431
b = 12.433
tot = a + b
avg = tot / 2
Console.WriteLine("add=" & tot)
Console.WriteLine("Avg=" & Round(avg, 2)) ‘ Round Value &
‘ Precision points
End Sub
 
End Module Dot Net: Practical & Project Guide
Imports System.Math
Module Module1 Ex: 5
 
Sub Main ()

Dim na1, na2, na As String

Console.WriteLine("Enter ur First Name")


na1 = Console.ReadLine
Console.WriteLine("ur First Name is : " & na1)

Console.WriteLine("Enter ur Second Name")


na2 = Console.ReadLine
Console.WriteLine("ur Second Name is : " & na2)

na = na1 + na2 ‘String Concatenation

Console.WriteLine("ur Name is : " & na)


End Sub
 
End Module
Dot Net: Practical & Project Guide
Simple Interest
Ex: 6

Module Module1
 
Sub Main ()
Dim r As Integer
Dim p, n, si As Decimal
r=5
p = 1000
n=1
si = p * n * r / 100
Console.WriteLine ("SI:" & si)

End Sub
 
End Module
Dot Net: Practical & Project Guide
Circle
Ex: 7

Module Module1
 
Sub Main ()
Dim r As Integer
Dim a, pi As Decimal
pi = 3.1415 ‘Constant Value
Console.WriteLine("Enter the value in r")
r = Console.ReadLine
a = pi * r * r
Console.WriteLine("The value of circle is=" & a)

End Sub
 
End Module
Dot Net: Practical & Project Guide
Date & String Functions 

Ex: 8
Console.WriteLine(" using today" & Today)
Console.WriteLine(" using now" & Now)
Console.WriteLine(" using timeof day" & TimeOfDay)
Console.WriteLine(Format(Now, "d-M-yy"))
Console.WriteLine(Format(Now, "dd-MM-yyyy"))

Console.WriteLine("The compared string is :" & String.Compare(10, 100))

Console.WriteLine("The reversed string is :" & StrReverse("LOYOLA"))

Console.WriteLine("The converted lower string is :" & LCase("LOYOLA"))

Console.WriteLine("The converted Upper string is :" & UCase("loyola"))

Console.WriteLine("The length of the string is :" & Len("LOYOLA"))

Console.WriteLine("The center justified string is :"&Trim("LOYOLA"))

Console.WriteLine("The left justified string is:" & LTrim("LOYOLA "))

Console.WriteLine("The right justified string is :"&RTrim("LOYOLA "))


Dot Net: Practical & Project Guide

You might also like