Net Full Stack Course
Net Full Stack Course
Back-end: C#.Net, .Net Core Web API, Entity Framework(Code First Approach), Linq
Pre-requisite
- HTML
- CSS
- JavaScript
Tools
- VS 2022 - Community
- N-Tier
- 4 Project
- Solutions
-
Desktop
- winforms
Web
- webforms | mvc
Mobile
- Xamarin
Program.cs - class
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, World!");)
}
}
Console.Readkey();
Data types in C#
- string
string name = "Andrew";
- int
int sum = 40;
- float
float marks = 70.5f;
- char
char letters = 'M';
- bool
bool Status = true;
string name;
- Reserved keywords
- abstract
- const
- new
- partial
- readonly
- sealed
- static
- virtual
- override
Access Modifiers
- public
- private
- internal
- protected
- protected internal
Class : A class can contain one or more constructors, fields, methods, properties,
delegates and events. They are called class members.
A class and its members can have access modifiers such as public, private,
protected and internal to restrict access from other parts
of the program.
Syntax:
- class class-name
{
}
// Constructor
public Student()
{
}
// Field
public int Id;
// Property
public string name { get; set; }
// Method
public int Sum()
{
}
}
Object: In C#, an object of a class can be created using the new keyword and assign
that object to a variable of a class type.
- Operators
- Operators are used to perform operations on variables and values.
- Assignment Operator
=
- Arithmetic Operators
- + -> Addition
- int num1 = 10;
- int num2 = 20;
- int sum = num1 + num2;
- Console.WriteLine(sum);
- - -> Subtraction
- * -> Multiplication
- / -> Division
- % -> Modulus
- ++ -> Increment
11 < 10
for(int i = 0; i <= 10; i++)
{
}
- -- -> Decrement
- Comparison Operators
- ==
- !=
- >
- <
- >=
- <=
- Logical Operators
- && - AND
|| - OR
- Ternary Operator ?
- Null Coalescing Operator ??
-----------------------------------------------------------------------------------
------------------------------------------------------------------------
Task: 01 -