🎙️ 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...
1 ) Create App
2) Create urls.py and define four different path
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about'),
path('contact', views.contact, name='contact'),
path('service', views.service, name='service')
]
3 create views.py and define method
from django.shortcuts import render
def index(request):
return render(request,"siteapp/index.html")
def about(request):
return render(request,"siteapp/about.html")
def contact(request):
return render(request,"siteapp/contact.html")
def service(request):
return render(request,"siteapp/service.html")
4 create templates/appname and create four different html file
index.html:-
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Home page</h1>
</body>
</html>
about.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>welcome in about page</h1>
</body>
</html>
service.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Services Page</h1>
</body>
</html>
contact.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Contact Page</h1>
</body>
</html>
5) register app in setting and urls.py of base app
6) create Style.css
css means cascading style sheet it is used to provide set of properties to define HTML element.
create css file under static/css/filename
use <link> tag to link css file in HTML page
it will be always declared under
<head>
<link href="/static/css/style.css" type="text/css" rel="stylesheet" />
</head>
2) Create urls.py and define four different path
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('about', views.about, name='about'),
path('contact', views.contact, name='contact'),
path('service', views.service, name='service')
]
3 create views.py and define method
from django.shortcuts import render
def index(request):
return render(request,"siteapp/index.html")
def about(request):
return render(request,"siteapp/about.html")
def contact(request):
return render(request,"siteapp/contact.html")
def service(request):
return render(request,"siteapp/service.html")
4 create templates/appname and create four different html file
index.html:-
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Home page</h1>
</body>
</html>
about.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>welcome in about page</h1>
</body>
</html>
service.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Services Page</h1>
</body>
</html>
contact.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a href="">Home</a>
<a href="about">About us</a>
<a href="contact">Contact us</a>
<a href="service">Services</a>
<h1>Welcome in Contact Page</h1>
</body>
</html>
5) register app in setting and urls.py of base app
6) create Style.css
css means cascading style sheet it is used to provide set of properties to define HTML element.
create css file under static/css/filename
use <link> tag to link css file in HTML page
it will be always declared under
<head>
<link href="/static/css/style.css" type="text/css" rel="stylesheet" />
</head>
Comments
Post a Comment
POST Answer of Questions and ASK to Doubt