Dot Net Basics

📘 .NET Framework – Basics & Concepts


🔹 .NET

dot net is a framework.


🔹 Framework

Framework- which supports all form based applications.


🔹 Types of Code

  1. Logical code (dot net - in which tools are dragged and dropped, they are not created using code, only code will be applied logically)

  2. Design code (c++, Java - in which no drag and drop option will be available)


🔹 Dot Net Supported Languages

  1. Java

  2. C# [mostly used]

  3. Python

  4. VB


🔹 Dot Net Supported Environment

  1. Console application (basic)

  2. Web application (runs everywhere)

  3. 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:

  1. Using conditions → (if else, switch) // Conditional Statements

  2. 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

  1. Body statements (inside body)

  2. Block statements (inside conditions)

  3. Container statements (inside functions)


🔹 Features of Good Programming

  1. Minimum length

  2. 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

  1. Design (.aspx [it is created by the user])

  2. Source (html format - Auto-generated)

  3. 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

  1. Remove all files from Solution Explorer

  2. Remove Account folder


🔹 Creating First Web Form

(In dot net, web page is called as web form)

Steps:

  1. Select root from Solution Explorer

  2. Go to Website menu → Add New Item


Comments

Popular posts from this blog

Introduction To HTML

Data Binding Functions

Export GridView to Excel