Saturday, 29 March 2025

10+ Years Question and answers

 1.Globalization(Application that function for multiple cultures- Using unicode, Formatting date, number and currencies calender) vs localization(cluture translation text , adapting UI elements and Adjusting image and icons)

Resources.resx(using system.Resources)

2.Event Driven architecture (Event Source, Event, Event Broker/Event Bus , Publisher, Subscriber, Event Handler , Dispatch)

3.Eventhandler(event keyword) vs function pointers(delegate)

4.IOC - DIO

5. Reflection 

6. System.IO - read and write files using streamwriter and streamreader

7. Hashmaps in c# - dictionary<string,int>
Add,containskeys,remove

8. Use an eager loading ienumerable( not benefit from deferred execution)
Use a Lazy loading Iqueryable ( defers execution of the entire query until output is required)

9. Null Coalescing Operator - a=b??c; means if b is null then a will be assigned the value of c

10. Example for boxing and unboxing 
Is - reference, boxing and unboxing 
As- nullable, Reference and boxing

11. In Web API header
Content-Type: request body
Accept : response format

12. In web AP
Httpget - will not have the body , it will need only the query params
Httpost - will have the body params

Thursday, 20 March 2025

10+ Years .NET Interview Questions and answers

1. Sql profiler - performance tracking


2. Sql where group by having order by

3.Mediator design pattern - reduce direct connection between classes and promote loose coupling and easier code maintenance 





4.singletone object creating - private constructor creating the object inside the static method getinstance with in the same class


5. Finally (After try block it will run every time) vs disposes(using keyword will dispose it automatically when square bracket ends. Explicit implementation: IDispose)

6.Dictionary (Generic type , typecasing is not required) vs hash table(Non Generic type , typecasting is required)

7.Corse- domain check

8.Crossed side scripting - encoding - httputility.HtmlEncode(userInput)

9.Convariance(more derived type to a less derived type(get)(generic interface - out keyword) and conravarient(less derived type to more derived type(set)(in keyword))

10. JWT Token will access the keyvault
When a client request access to key vault , it must authenticate with Microsoft Entra ID to obtain an OAuth token(Using Cryptography Client to sign the token with the key)

11. Thread lock in C# - Using Lock
 Keyword

12. Task ( asyn operation using Task parallel library , )VS Thread( Parallel execution of code)

13. Background process in .netcore?
IHostedservice interface and backgroundservice class

14. Code optimization in API 

15. Statefull (RESTFULL)(more complex interaction)(Shopping carts - HttpContext.Session.GetObjectFromJson<List>)
 vs
 Stateless(REST) ( do not store client data between request)(public Api weather service)(Each request from a client to service must contain all the information for process the request)

16. AddSession. Idletimeout property in configuration service in startup.cs

17.Soap VS Rest

18.Use of nugget packages
19. Request Delegates in .Net Core
20.Di containers
21. Irepository design pattern 
22. Can abstract class can have constructor - yes

23.Acid principle
24. Mapper in ops

25. Repository design patten
26.Html 5 relation
27.Access token vs refresh token
28.Exceptional handling- trypass
29.Rapidmq
30.Kafka- ques system 

31. Onion Artich
32.Value type - bool
33. Ref type 
34. SQL Pivot 
35. Thread vs task vs syn vs asyn
36. Catching
37.Dependency injection in core
38. Breakpoint in azure
39. .net core Dependency injection (t,scope,singleton)
40. .net core iconfiguration getsection .value get value ioption 
@ CORS- 
41.unauthorized requests to a different domain(keyword : enablecors, disablecors)
42.React
Useeffect -syntext
Arrr[1,2,2,3]

Humanaan
------------
  • Singleton design 
  • Dispose and finally 
  • Boxing and unboxing
  • Unmanaged vs managed code
  • Early and lazy binding 
  • Entity framework 
  • Dependency injection in .net core
  • Inbuilt container for DI
  • .net core VS .net classic 
  • Nuget package usage
  • Startup.cs what is used
  • Use of program.cs
  • Service registration in startup.cs
  • www.root folder
  • App.setting.json
  • Session and state management in .net core
  • Rest in webapi
  • SOAP vs Rest
  • Token based authentication
  • SQL - SQL Profile 

Complex thing I have faced 
 Stub and external service in logic for the startup.cs