সি শার্প (C#) — MCQ প্রশ্ন
আইটি ও প্রোগ্রামিং MCQ (ওপেন) · আইটি ও প্রোগ্রামিং। এই অধ্যায়ে মোট 366টি প্রশ্ন আছে। নিচে প্রথম 10টি প্রশ্ন ও অপশন দেওয়া হলো; সঠিক উত্তর সার্ভারে যাচাই হয়।
এই অধ্যায়ে সব প্রশ্নে অনুশীলন করুন
In ASP.NET Core, which method is used to configure the HTTP request pipeline?
- ConfigureServices
- Configure
- Main
- Build
উত্তর যাচাই করতে প্র্যাকটিসে যান।
Where are services registered for Dependency Injection in ASP.NET Core?
- Configure method
- ConfigureServices method
- Main method
- appsettings.json
উত্তর যাচাই করতে প্র্যাকটিসে যান।
What is the default configuration file name in ASP.NET Core?
- config.json
- settings.json
- appsettings.json
- web.config
উত্তর যাচাই করতে প্র্যাকটিসে যান।
Which middleware component serves static files (CSS, JS, images) from the wwwroot folder?
- UseStaticFiles()
- UseDefaultFiles()
- UseFileServer()
- UseDirectoryBrowser()
উত্তর যাচাই করতে প্র্যাকটিসে যান।
In .NET 6+, what replaces the separate Program.cs and Startup.cs files?
- Minimal APIs only
- Top-level statements in Program.cs
- Global.asax
- Web.config
উত্তর যাচাই করতে প্র্যাকটিসে যান।
Which interface represents a component that processes HTTP requests in the middleware pipeline?
- IApplicationBuilder
- IHttpContextAccessor
- IMiddleware
- IServiceProvider
উত্তর যাচাই করতে প্র্যাকটিসে যান।
What is the purpose of the 'UseRouting' middleware?
- To serve static files
- To match incoming requests to endpoints
- To handle authentication
- To log requests
উত্তর যাচাই করতে প্র্যাকটিসে যান।
Which attribute designates a class as a Controller in ASP.NET Core MVC?
- [Controller]
- [ApiController]
- [Route]
- All of the above
উত্তর যাচাই করতে প্র্যাকটিসে যান।
How do you access a configuration value (e.g., 'ConnectionStrings:Default') in a controller?
- Configuration.GetConnectionString("Default")
- Configuration["ConnectionStrings:Default"]
- Both A and B work
- Neither works
উত্তর যাচাই করতে প্র্যাকটিসে যান।
What is the lifetime of a service registered with 'AddScoped'?
- A new instance for every request
- A single instance for the application lifetime
- A new instance every time it is requested
- A new instance per user session
উত্তর যাচাই করতে প্র্যাকটিসে যান।