Notes
Notes
WEB DEVELOPMENT
ASP.NET
ROOBA AHMAD
15-Dec-18
1899 -19
SOFTWARES: + Lecture 1
☺ Microsoft visual studio 2018
☺ SQL Management studio x_64.exe
☺ SQL EXPR_X64.EXE
☺ WINRAR.EXE
☺ Power ISO 5.6+ keygan+serial.exe
Gujranwala
Page 1
2. Introduction to c#
C# was developed before 8 to 10 years ago by Microsoft.
They use as to compare with Visual basic. VB was used before 25 to 30 years
ago to build software. Examples are: Window 98, me, 2000.
Java ko dekhty huy bnai gi c#. Examples are Window-> xp, 7, 8, 10, vista
You may change the both name. But better to use same name.
Log In, sign up are examples of solution application. Press ctrl+f5 to print
Page 2
How to print?
Console.WriteLine (“hello”); or Console.Write (“hello”); ->\n
3. Data types
Data type Use
String Anything numbers, special symbol, characters etc.
Int 1, 2, 3…
Float 0,+-1,+-2……+-9.9
Double 0, 1, 2, 3, 4…….
Bool True, False
DateTime For date time
Char To store characters
Int? Null integer-> use to store null & strings int numbers
Float? Null float-> use to store null & strings float numbers
Double? Null double-> use to store null & strings double numbers
Char? Null char-> use to store null & strings char numbers
DateTime? Null DateTime-> will store null & strings DateTime numbers
StringBuilde To add new data
r
Var Use for any type of data
Object Same as Var but a slight difference.
Restrictions of Var data type: You are not allowed to make array, list.
Object: data type change ni krta variable mn aik hisy mn variable store krta
hai. By typecasting (string) we can change data type.
but can store in string. Simple int is used in different applications. But to
extract data from database we have to use int? .
Ternary operator:
Console.Write (age>=18?”you are adult”: “you are
younger”);
Find method is use to print 91 only one time. You can use findAll method
for 55 if x==55 to print 55 3 times. Here x is lamda (that is use to assume
something) for user but for compiler it is a variable.
C#:
Sharp (#) is basically a music language that means to style.
Page 5
Reading:
Writing:
This program will remove previously data from the file. So better method is
Page 6
You can also use write a file using while loop but it will be a huge code.
Classes
Page 7
You can also create classes with the method learned in other languages.
Functions
1st method 2nd method
6. Params
Create table:
Page 9
Where clause:
Page 10
8. Stored procedure
What is stored procedure?