2. What is your present application (explain) ?
3. How many ways you can do session management ?
4. Do you think .net is language independent ? how
5. Did you ever get out of memory exception in your applications ?
6. How can you write you own Custom exception class ?
class MyCustomException : Exception
{
public MyCustomException(string str)
{
Console.WriteLine(str + " thrown an exception \n");
}
}
static void Main(string[] args)
{
try
{
throw new MyCustomException("Sekhar");
}
catch (Exception e)
{
Console.WriteLine(e.Message.ToString()+"\n");
}
}
7. What is managed code and unmanaged code ?
8. Can you use a C++ dll in you .net code ? if yes , how ?
There are P/Invoke services in .net ( Platform Invocation Services )...They allow us to use c++ dll in .net code...
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5df04db1-bbc8-4389-b752-802bc84148fe/
9. What is garbage collector ?
10. What if an object taken to leve2 in GC ? what will happen ?
11. do you know about boxing ?
12. Have you used delegates? what are multicast delegates ? how to create them?
13. how many constructors can you have in a class ?
14. how can you copy an object ?
15. Do you know about shallow copy and deep copy ?
16. What are the builtin interfaces you use in your daily coding?
IDisposable, IComparable, IEnumerable...
17. What is iDisposable ? or why is dispose method ? is that called by GC ?
18. Have you used using(){} block in c# ? whats the use of it ?
The using statement defines a scope at the end of which an object will be disposed.
You create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if, for example, an exception is thrown and control leaves the statement block before the end of the statement.
using(Font ObjFont = new Font("Arial",10.0f))
{
//Use the object 'ObjFont' here....
}//Compiler will call Dispose on 'ObjFont' at this end...
The object you instantiate must implement the System.IDisposable interface.
If you create an object inside using for a custom class which is not implemented IDisposable interface, then it will give you compile error saying that class must implement IDisposable interface.....
Suppose If an exception is thrown inside using, will it still call the dispose on the Object? Yes..surely it will call Dispose even though an exception is thrown inside using.
19. You are presently working on which version of .net? A. 3.5 ;
Q. You have worked on any other versions or only on 3.5 ? A. 2.0 also;
Q. What are the differences you find in 2.0 and 3.5 ?
20. Linq uses two interfaces what are they ? ans. 1. IEnumerable
Q. what is the other one?
21. What are the methods used in linq ? he gave some scenerio - so - the methods are called extension methods.
22. what is the syntax for extension methods ?
23. Can you tell me the logic to check if a string is palindrom or not without using builtin functions ?
string str = "MALAYALAM";
for (int i = 0; i < str.Length / 2; i++)
{
if(str[i]!=str[str.Length-(i+1)])
{
Console.WriteLine("Not a Palindrome");
return;
}
}
Console.WriteLine("Its a Palindrome");
//Observe..You are using String varialbe str as a Char Array...
//May be it can be used like that in .net 3.5
24. What is an abstract class?
25. I will give you a scenerio, tell me the architecture or classes required to do that. I have a customer and he has an account . he should be able to deposit money and withdraw money.
(twist ... you can have only one method for deposit and withdraw , as withdarw means deposit a negitive balance)
26. How will you find out and solve an issue in windows application?
27. Do you have any testing tools knowledge like NUnit, ?
28. You have any knowledge in design patterns ? have you used anyone ?
29. You got any chance to work for console applications ?
30. What is the coding methodology you use ? do you know azile methodology ?
Interview Duration : 1hr.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.