Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   C# interview questions (http://www.go4expert.com/forums/c-sharp-interview-questions-t2272/)

shabbir 17Dec2006 06:42

C# interview questions
 
1 Describe the difference between a Thread and a Process?

2 What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

3 What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

4 What is the difference between an EXE and a DLL?

5 What is strong-typing versus weak-typing? Which is preferred? Why?

6 Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.

7 What is a PID? How is it useful when troubleshooting a system?

8 How many processes can listen on a single TCP/IP port?

9 What is the GAC? What problem does it solve?

10 What is serialization in .NET? What are the ways to control serialization?

11 Does C# support multiple inheritance?

12 What’s the implicit name of the parameter that gets passed into the class’ set method?

13 What’s the top .NET class that everything is derived from?

14 How’s method overriding different from overloading?

15 What is CLR?

16 What is CTS?

17 What is CLS?

18 What is strong name?

19 What is Application Domain?

20 Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.

21 Describe what an Interface is and how it’s different from a Class.

22 What is Reflection?

23 What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

24 Are the type system represented by XmlSchema and the CLS isomorphic?

25 Conceptually, what is the difference between early-binding and late-binding?

26 Is using Assembly.Load a static reference or dynamic reference?

27 When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?

28 What is an Asssembly Qualified Name? Is it a filename? How is it different?

29 Is this valid? Assembly.Load("foo.dll");

30 How is a strongly-named assembly different from one that isn’t strongly-named?

31 Can DateTimes be null?

32 What is the JIT? What is NGEN? What are limitations and benefits of each?

33 How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?

34 What is the difference between Finalize() and Dispose()?

35 How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?

36 What does this useful command line do? tasklist /m "mscor*"

37 What is the difference between in-proc and out-of-proc?

38 What technology enables out-of-proc communication in .NET?

39 When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

40 What is FullTrust? Do GAC’ed assemblies have FullTrust?

41 What are Satellite Assemblies?

42 What is Global Assembly Cache (GAC) and what is the purpose of it?

43 What is Reflection in .NET?

44 What is the managed and unmanaged code in .net?

45 What are Namespaces?

46 What are the access-specifiers available in c#?

47 Advantage of ADO.Net?

48 Difference between OLEDB Provider and SqlClient ?

49 Differences between dataset.clone and dataset.copy?

50 In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best choice?

51 What is Remoting?

52 What’s the difference between System.String and System.StringBuilder classes?

53 What’s a delegate?

54 What’s an interface class?

55 What is the transport protocol you use to call a Web service ?

56 What’s wrong with a line like this? DateTime.Parse(myString);

57 What are PDBs? Where must they be located for debugging to work?

58 What is cyclomatic complexity and why is it important?

59 Write a standard lock() plus “double check” to create a critical section around a variable access.

60 What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?

61 What does this do? gacutil /l | find /i "Corillian"

62 What does this do? sn -t foo.dll

63 What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

64 Contrast OOP and SOA. What are tenets of each?

65 How does the XmlSerializer work? What ACL permissions does a process using it require?

66 Why is catch(Exception) almost always a bad idea?

67 What is the difference between Debug.Write and Trace.Write? When should each be used?

68 What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?

69 Does JITting occur per-assembly or per-method? How does this affect the working set?

70 Contrast the use of an abstract base class against an interface?

71 What is the difference between a.Equals(b) and a == b?

72 In the context of a comparison, what is object identity versus object equivalence?

73 How would one do a deep copy in .NET?

74 Explain current thinking around IClonable.

75 What is boxing?

76 Is string a value type or a reference type?

77 What is the significance of the "PropertySpecified" pattern used by the XmlSerializer? What problem does it attempt to solve?

78 Why are out parameters a bad idea in .NET? Are they?

79 Can attributes be placed on specific parameters to a method? Why is this useful?

80 Juxtapose the use of override with new. What is shadowing?

81 Explain the use of virtual, sealed, override, and abstract.

82 Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

83 Explain the differences between public, protected, private and internal.

84 What benefit do you get from using a Primary Interop Assembly (PIA)?

85 By what mechanism does NUnit know what methods to test?

86 What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}

87 What is the difference between typeof(foo) and myFoo.GetType()?

88 Explain what’s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?

89 What is this? Can this be used within a static method?

shabbir 17Dec2006 06:45

Describe the difference between a Thread and a Process?
 
Threads are similar to processes, but differ in the way that they share resources. Threads are distinguished from processes in that processes are typically independent, carry considerable state information and have separate address spaces. Threads typically share the memory belonging to their parent process.

shabbir 17Dec2006 06:50

What is the difference between an EXE and a DLL?
 
An exe runs in it's own address space / process but Dll gets loaded into the exe's process address space.

In C# dll does not have a main

shabbir 17Dec2006 06:53

What’s a delegate?
 
A delegate is signature to a method and delegate objects is a reference to a method. In C++ they were referred to as function pointers but with a major difference that delegates can be multicast but function pointers cant be.

Programmer.Nick 21Dec2006 01:28

What is the difference between an EXE and a DLL?
 
The Diffrence Betwen DLL File and EXE File is :

An EXE is visible to the system as a regular Win32 executable. Its entry
point refers to a small loader which initializes the .NET runtime and tells
it to load and execute the assembly contained in the EXE.
A DLL is visible to the system as a Win32 DLL but most likely without any
entry points. The .NET runtime stores information about the contained
assembly in its own header.

I hope i'm right, if i'm not, please correct me

Programmer.Nick 21Dec2006 01:33

What IS CLR ?
 
What IS CLR ?:

As part of Microsoft's .NET Framework, the Common Language Runtime (CLR) is programming that manages the execution of programs written in any of several supported languages, allowing them to share common object-oriented classes written in any of the languages.

shabbir 21Dec2006 10:46

Re: What is the difference between an EXE and a DLL?
 
Quote:

Originally Posted by Programmer.Nick
An EXE is visible to the system as a regular Win32 executable. Its entry point refers to a small loader which initializes the .NET runtime and tells it to load and execute the assembly contained in the EXE.I hope i'm right, if i'm not, please correct me

Not exactly correct. .NET exe is not a Win32 Exec but its a pseudo exe which runs on the .net framework. So its not an exactly exe.

LMatta 29Jun2007 18:03

Re: C# interview questions
 
What are Namespaces ?

Logical Container which will organize your classes is called namespaces.

LMatta 29Jun2007 18:18

Re: C# interview questions
 
11 Does C# support multiple inheritance?


C# does not support Multiple Inheritance. But to achieve Multiple Inheritance C# makes use of Interface.

LMatta 29Jun2007 18:21

Re: C# interview questions
 
Is string a value type or a reference type?

String is a Reference type and not a valuetype


All times are GMT +5.5. The time now is 16:03.