Question. Rate yourself in C#, ASP.NET, Oracle
Answer. C# - 8
ASP.NET - 7
Oracle - 7
Question. Lets start with .NET, What is CLR and what is the task perform by CLR?
Answer. CLR stand for Common language runtime. it have the task like
1. running the garbage collector
2. Code verification
3. code access security
4. executing IL
Question. What is assembly? and what is difference between the .dll and .exe?
Answer. Assembly is a basic unit of .net program and it contains the all .net code, resources, references and versions etc.
.exe and .dll are same while .exe contains executable code and is machine dependent.
Question. if dll and exe files are same it means you can deploy both the files in GAC?
Answer. No, deploying a exe file does not mean anything because classes and method are exposed in dll only and exe file is pure executable, any application can not call the function of exe file.
Question. How will you deploy the dll file in GAC?
Answer. first create the strong name for dll and add this sn name key into the application then use gacutil command to register the dll in GAC.
Question. How will you search for a dll in GAC before registering it?
Answer. use process explorer to check the dlls, if you have any other suggestion, Please comment.
Question. What is difference between IL and DLL ?
Answer. DLL contains the IL and other details (metadata) inside.
Question. is exe is machine dependent?
Answer. yes
Question. How to pass the arguments in thread?
by passing the arguments in start() method.
Answer. thread t1 = new thread(new threadstart(obj.abc));
t1.start(21);
Question. What changes will you do if you have to pass string instead of int in thread arguments?
Answer. no chnages in thread while we change the method to receive the string or abject variable.
Question. What are the properties of abstract class?
Answer. 1. abstract class can contain the prototype of method and/or implementation of methods.
2. Direct object of abstract class is not possible.
3. we need to inherit a class and make the object of derive class and can access the abstract class methods.
4. abstract classes can contains the abstract functions.
Question. can we have this definition in abstract class?
abstract class abc
{
abc obj;
}
Answer. yes, we can have same type of obj we can define in and instantiate to derive class.
Question. What pattern you used?
Singleton and facade
Question. describe the facade pattern and use in you project?
Answer. it is used to access the whole subsystem through a system. i used it in a customer class to access the subsystem like sales, billing, invoice etc.
Question. What is singleton pattern?
Answer. creating only one object of a class.
Question. How will you handle deadlock in singleton pattern?
Answer. use lock or monitor to access by single thread.
Question. What is difference between monitor.enter and monitor.tryenter functions?
Answer. monitor.enter waits for the lock until it does not get it.
while monitor.tryenter will request for lock and it return true if get the lock and return false if does not get it and process further statements.
Question. instead of creating a singleton class, suppose i create a static object of singleton class outside the class and use it though out the application, then what is use of singleton class?
Answer. singleton class is use that accidently programmer do not create the another object of the class. it is used in large systems where we expose class and functions though dlls and want to restrict programmer while using this dll do not creating multiple objects.
Question. Why forcing garbage collector to run is not recommended?
Answer. because it sometimes create performance issue and block other threads.
I have given the aptitude test...
ReplyDeleteThe aptitude had three sections:
section 1:
5 question on quantitative aptitude..quite simple
section 2:
write a code to take input of no. of shares,cost price of each share,selling price.Service charge on sale or purchase is 1.5%..calculate total investment,profit/loss,amount gained on selling the stocks..
section 3:
write an essay (200 words) on any of following:
1.inflation in india and steps to improve it
2.current financial crisis in mumbai..