Dot Net Basics
📘 .NET Framework – Basics & Concepts
🔹 .NET
dot net is a framework.
🔹 Framework
Framework- which supports all form based applications.
🔹 Types of Code
Logical code (dot net - in which tools are dragged and dropped, they are not created using code, only code will be applied logically)
Design code (c++, Java - in which no drag and drop option will be available)
🔹 Dot Net Supported Languages
Java
C# [mostly used]
Python
VB
🔹 Dot Net Supported Environment
Console application (basic)
Web application (runs everywhere)
Windows application (local software)
🔹 Basics of .NET
int x; // blue words are data types
x = int.Parse(Console.ReadLine()); // parsing
// int.Parse - for integer input
// float.Parse - for float input
// no conversion for string variable
Console.WriteLine(" the value of x is " + x); // Cascading operator
🔹 Cascading Operator
CASCADING OPERATOR- MESSAGE + VARIABLE
It is a feature of dot net which separates message and variable
Example:
Console.WriteLine("the value is a" + a);
"+" is cascading operator.
🔹 Program Management
Program can be managed by two ways:
Using conditions → (if else, switch) // Conditional Statements
Using flow (loop) → (while, do while, for) // Looping Statements
while loop is called Entry loop
do while loop is called Exit loop
🔹 Types of Statements
Body statements (inside body)
Block statements (inside conditions)
Container statements (inside functions)
🔹 Features of Good Programming
Minimum length
Fastest execution
🔹 While Loop Drawback
Drawback of while loop is, it is MULTILINE loop.
To resolve this we have for loop which is SINGLELINE loop.
🔹 Dot Net Area
Design (.aspx [it is created by the user])
Source (html format - Auto-generated)
Code (.aspx.cs)
👉 When we create .aspx file then .cs (code) is automatically generated along with .aspx
🔹 Dot Net Environment
It consists of:
Solution Explorer → contains all files, folders, directories, API etc.
Server Explorer → all database related work
Toolbox → contains all tools
Property Window → properties of controls (text is common property)
🔹 Programming Environment
1) User
Where the program is built
2) Compiler
Grouping the statements
Error checking (Syntax error)
Types of Compiler
a) ON Compiler
If error occurs, program will not execute (like C)
b) OFF Compiler (JIT - Just In Time Compiler)
Works on event-driven error generation
Example: Error in registration page does not affect login
3) Interpreter
Reads code line by line
Handles runtime (logical) errors
🔹 Creating First Web Application in .NET
Steps:
File → New → Website
Select Visual C# (language)
Select ASP.NET Website
🔹 Rules
Remove all files from Solution Explorer
Remove Account folder
🔹 Creating First Web Form
(In dot net, web page is called as web form)
Steps:
Select root from Solution Explorer
Go to Website menu → Add New Item
Comments
Post a Comment