🎙️ INTRO (0:00 – 0:40) Namaste Doston! 👋 Main hoon [Your Name] aur aaj ke video mein hum baat karne wale hain C# 14.0 ke Top 10 Most Important Features ke baare mein. Ye update .NET 10 ke saath aaya hai aur C# ko aur zyada modern, clean aur developer-friendly banata hai. Main har feature ko simple example ke saath samjhaunga taaki aapko coding mein easily use kar paayein. So let’s start — C# 14 ke naye power-packed features! 🚀 🧩 1️⃣ Field-backed Properties (0:40 – 1:00) Pehla feature hai — Field-backed Properties Ab aapko manually private field likhne ki zarurat nahi. C# 14 mein ek naya contextual keyword aaya hai — field public string Name { get ; set => field = value ?? throw new ArgumentNullException( nameof ( value )); } Yahaan field compiler-generated backing field ko represent karta hai. Validation ya logic likhna ab super easy ho gaya hai! 🧩 2️⃣ Extension Members (1:00 – 1:25) Dusra feature — Extension Members Pehle hum si...
CALCULATOR PROGRAM IN ANGULAR 8
Step1st:- Create Controller using
ng g c Controllername
Step2nd:- Create Design of Calculator
Enter name
<input type="text" name="txt" value="{{ result }}" [(ngModel)]="txt" />
<br>
<br>
<input type="button" name="btn1" value="1" (click)="display($event)"/>
<input type="button" name="btn2" (click)="display($event)" value="2" />
<input type="button" name="btn3" (click)="display($event)" value="+" />
<input type="button" name="btn4" (click)="cal($event)" value="=" />
<input type="button" name="btn4" (click)="can($event)" value="C" />
Step3rd:- Create TypeScript
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-calc',
templateUrl: './calc.component.html',
styleUrls: ['./calc.component.css']
})
export class CalcComponent implements OnInit {
result=''
constructor() {
this.result=''
}
ngOnInit() {
}
display(event: any){
this.result= this.result+event.target.value;
}
cal(event: any)
{
this.result=eval(this.result)
}
can(event: any)
{
this.result=''
}
}

ng g c Controllername
Step2nd:- Create Design of Calculator
Enter name
<input type="text" name="txt" value="{{ result }}" [(ngModel)]="txt" />
<br>
<br>
<input type="button" name="btn1" value="1" (click)="display($event)"/>
<input type="button" name="btn2" (click)="display($event)" value="2" />
<input type="button" name="btn3" (click)="display($event)" value="+" />
<input type="button" name="btn4" (click)="cal($event)" value="=" />
<input type="button" name="btn4" (click)="can($event)" value="C" />
Step3rd:- Create TypeScript
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-calc',
templateUrl: './calc.component.html',
styleUrls: ['./calc.component.css']
})
export class CalcComponent implements OnInit {
result=''
constructor() {
this.result=''
}
ngOnInit() {
}
display(event: any){
this.result= this.result+event.target.value;
}
cal(event: any)
{
this.result=eval(this.result)
}
can(event: any)
{
this.result=''
}
}

Comments
Post a Comment
POST Answer of Questions and ASK to Doubt