Professional Documents
Culture Documents
1. What’s the advantage of using System.Text.StringBuilder over System.String? StringBuilder is more efficient in the cases, where a lot of
manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.
2. Can you store multiple data types in System.Array? No.
3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? The first one performs a deep copy of the array, the
second one is shallow.
4. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods.
5. What’s the .NET datatype that allows the retrieval of data by a unique key? HashTable.
6. What’s class SortedList underneath? A sorted HashTable.
7. Will finally block get executed if the exception had not occurred? Yes.
8. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? A catch block that catches the
exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.
9. Can multiple catch blocks be executed? No, once the proper catch code fires off, the control is transferred to the finally block (if there are any),
and then whatever follows the finally block.
10. Why is it a bad idea to throw your own exceptions? Well, if at that point you know that an error has occurred, then why not write the proper
code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws
in the project.
11. What’s a delegate? A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.
12. What’s a multicast delegate? It’s a delegate that points to and eventually fires off several methods.
13. How’s the DLL Hell problem solved in .NET? Assembly versioning allows the application to specify not only the library it needs to run (which was
available under Win32), but also the version of the assembly.
14. What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command.
15. What’s a satellite assembly? When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application
separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
16. What namespaces are necessary to create a localized application? System.Globalization, System.Resources.
17. What’s the difference between // comments, /* */ comments and /// comments? Single-line, multi-line and XML documentation comments.
18. How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with a /doc switch.
19. What’s the difference between <c> and <code> XML documentation tag? Single line code example and multiple-line code example.
20. Is XML case-sensitive? Yes, so <Student> and <student> are different elements.
21. What debugging tools come with the .NET SDK? CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET
uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.
22. What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown.
23. What does assert() do? In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is
false. The program proceeds without any interruption if the condition is true.
24. What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use
Trace class for both debug and release builds.
25. Why are there five tracing levels in System.Diagnostics.TraceSwitcher? The tracing dumps can be quite verbose and for some applications
that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing
to fine-tune the tracing activities.
26. Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor.
27. How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger.
28. What are three test cases you should go through in unit testing? Positive test cases (correct data, correct output), negative test cases (broken
or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
29. Can you change the value of a variable while debugging a C# application? Yes, if you are debugging via Visual Studio.NET, just go to
Immediate window.
30. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or
other sources).
31. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? SQLServer.NET data provider is high-
speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle,
DB2, Microsoft Access and Informix, but it’s a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer
provided for backward compatibility to ODBC engines.
32. What’s the role of the DataReader class in ADO.NET connections? It returns a read-only dataset from the data source when the command is
executed.
33. What is the wildcard character in SQL? Let’s say you want to query database with LIKE for all employees whose name starts with La. The
wildcard character is %, the proper query with LIKE would involve ‘La%’.
34. Explain ACID rule of thumb for transactions. Transaction must be Atomic (it is one unit of work and does not dependent on previous and
following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something
hasn’t), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed
even if the system crashes right after).
35. What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via
Microsoft SQL Server username and passwords).
36. Which one is trusted and which one is untrusted? Windows Authentication is trusted because the username and password are checked with
the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.
37. Why would you use untrusted verificaion? Web Services might use it, as well as non-Windows applications.
38. What does the parameter Initial Catalog define inside Connection String? The database name to connect to.
39. What’s the data provider name to connect to Access database? Microsoft.Access.
40. What does Dispose method do with the connection object? Deletes it from the memory.
41. What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter
is the same, including the security settings
General Questions
11. How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.
12. What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable.
13. What class is underneath the SortedList class?
A sorted HashTable.
14. Will the finally block get executed if an exception has not occurred?
Yes.
16. Can multiple catch blocks be executed for a single try statement?
No. Once the proper catch block processed, control is transferred to the finally block (if there are any).
17. Explain the three services model commonly know as a three-tier application.
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).
Class Questions
2. Can you prevent your class from being inherited by another class?
Yes. The keyword “sealed” will prevent the class from being inherited.
3. Can you allow a class to be inherited, but prevent the method from being over-ridden?
Yes. Just leave the class public and make the method sealed.
7. Why can’t you specify the accessibility modifier for methods inside the interface?
They all must be public, and are therefore public by default.
9. What happens if you inherit multiple interfaces and they have conflicting method names?
It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This
might cause a problem on a higher-level scale if similarly named methods from different interfaces expect
different data, but as far as compiler cares you’re okay.
To Do: Investigate
1. What’s the implicit name of the parameter that gets passed into the set method/property of a class?
Value. The data type of the value parameter is defined by whatever data type the property is declared as.
4. Can you declare an override method to be static if the original method is not static?
No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to
keyword override)
6. If a base class has a number of overloaded constructors, and an inheriting class has a number of
overloaded constructors; can you enforce a call from an inherited constructor to a specific base
constructor?
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the
overloaded constructor definition inside the inherited class.
1. What’s a delegate?
A delegate object encapsulates a reference to a method.
1. Is XML case-sensitive?
Yes.
3. How do you generate documentation from the C# file commented properly with a command-line
compiler?
Compile it with the /doc switch.
3. What’s the difference between the Debug class and Trace class?
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release
builds.
7. What are three test cases you should go through in unit testing?
1. Positive test cases (correct data, correct output).
2. Negative test cases (broken or missing data, proper handling).
3. Exception test cases (exceptions are thrown and caught properly).
2. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from
Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and
Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as
SqlServer.NET.
6. Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is
untrusted?
Windows Authentication is trusted because the username and password are checked with the Active Directory,
the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.
7. What does the Initial Catalog parameter define in the connection string?
The database name to connect to.
Assembly Questions
General Questions
11. How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.
12. What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable.
14. Will the finally block get executed if an exception has not occurred?
Yes.
16. Can multiple catch blocks be executed for a single try statement?
No. Once the proper catch block processed, control is transferred to the finally block (if there are any).
17. Explain the three services model commonly know as a three-tier application.
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).
Class Questions
2. Can you prevent your class from being inherited by another class?
Yes. The keyword “sealed” will prevent the class from being inherited.
3. Can you allow a class to be inherited, but prevent the method from being over-ridden?
Yes. Just leave the class public and make the method sealed.
7. Why can’t you specify the accessibility modifier for methods inside the interface?
They all must be public, and are therefore public by default.
9. What happens if you inherit multiple interfaces and they have conflicting method names?
It’s up to you to implement the method inside your own class, so implementation is left entirely up to you.
This might cause a problem on a higher-level scale if similarly named methods from different interfaces
expect different data, but as far as compiler cares you’re okay.
To Do: Investigate
1. What’s the implicit name of the parameter that gets passed into the set method/property of a
class?
Value. The data type of the value parameter is defined by whatever data type the property is declared as.
4. Can you declare an override method to be static if the original method is not static?
No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is
changed to keyword override)
6. If a base class has a number of overloaded constructors, and an inheriting class has a number of
overloaded constructors; can you enforce a call from an inherited constructor to a specific base
constructor?
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the
overloaded constructor definition inside the inherited class.
1. What’s a delegate?
A delegate object encapsulates a reference to a method.
1. Is XML case-sensitive?
Yes.
3. How do you generate documentation from the C# file commented properly with a command-line
compiler?
Compile it with the /doc switch.
3. What’s the difference between the Debug class and Trace class?
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and
release builds.
7. What are three test cases you should go through in unit testing?
1. Positive test cases (correct data, correct output).
2. Negative test cases (broken or missing data, proper handling).
3. Exception test cases (exceptions are thrown and caught properly).
8. Can you change the value of a variable while debugging a C# application?
Yes. If you are debugging via Visual Studio.NET, just go to Immediate window.
2. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from
Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and
Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as
SqlServer.NET.
6. Between Windows Authentication and SQL Server Authentication, which one is trusted and which
one is untrusted?
Windows Authentication is trusted because the username and password are checked with the Active
Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in
the transaction.
7. What does the Initial Catalog parameter define in the connection string?
The database name to connect to.
Assembly Questions
1. 1. Name 10 C# keywords.
abstract, event, new, struct, explicit, null, base, extern, object, this
A member marked internal is only accessible from files within the same assembly.
Access is restricted to types derived from the containing class or from files within the same assembly.
public
private
No.
11. 11. Methods must declare a return type, what is the keyword used when nothing is returned from the method?
void
static
13. 13. Write some code using interfaces, virtual methods, and an abstract class.
using System;
Only one of them is run, that is the one marked (public) static, e.g:
No
using System;
namespace Console1
{
class Class1
{
[STAThread] // No longer needed
static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
17. 17. What are the two return types for main?
Reference parameters reference the original object whereas value parameters make a local copy and do not affect the original. Some example code is
shown:
using System;
namespace Console1
{
class Class1
{
static void Main(string[] args)
{
TestRef tr1 = new TestRef();
TestRef tr2 = new TestRef();
Console.WriteLine(tv1);
Console.WriteLine(tv2);
Console.WriteLine(tr1.TestValue);
Console.WriteLine(tr2.TestValue);
Console.ReadLine();
}
static public void TestRefVal(ref int tv1Parm,
int tv2Parm,
ref TestRef tr1Parm,
TestRef tr2Parm)
{
tv1Parm = 2;
tv2Parm = 2;
tr1Parm.TestValue = "New value";
tr2Parm.TestValue = "New value";
}
}
}
class TestRef
{
public string TestValue;
}
2
1
New value
New value
An out parameter allows an instance of a parameter object to be made inside a method. Reference parameters must be initialised but out gives a reference to
an uninstanciated object.
20. 20. Write code to show how a method can accept a varying number of parameters.
using System;
namespace Console1
{
class Class1
{
static void Main(string[] args)
{
ParamsMethod(1,"example");
ParamsMethod(1,2,3,4);
Console.ReadLine();
}
A constructor performs initialisation for an object (including the struct type) or class.
24. 24. If I have a constructor with a parameter, do I need to explicitly create a default constructor?
Yes
25. 25. What is a destructor?
A C# destuctor is not like a C++ destructor. It is actually an override for Finalize(). This is called when the garbage collector discovers that the object is
unreachable. Finalize() is called before any memory is reclaimed.
No
A delegate in C# is like a function pointer in C or C++. A delegate is a variable that calls a method indirectly, without knowing its name. Delegates can point to
static or/and member functions. It is also possible to use a multicast delegate to point to multiple functions.
namespace Console1
{
class Class1
{
delegate void myDelegate(int parameter1);
Test2(d);
Console.ReadLine();
}
class MyClass
{
public void AMethod(int param1)
{
Console.WriteLine(param1);
}
}
}
using System;
namespace Console1
{
class Class1
{
delegate void myDelegate(int parameter1);
myDelegate d = null;
d += new myDelegate(myInstance.AMethod);
d += new myDelegate(AStaticMethod);
d(1); //both functions will be run.
Console.ReadLine();
}
}
class MyClass
{
public void AMethod(int param1)
{
Console.WriteLine(param1);
}
}
}
The main reason we use delegates is for use in event driven programming.
See 32
Asynchronous
Objects publish events to which other applications subscribe. When the publisher raises an event all subscribers to that event are notified.
Yes, also - here's some code for a publisher with multiple subscribers.
using System;
namespace Console1
{
class Class1
{
delegate void myDelegate(int parameter1);
Console.ReadLine();
}
}
class MyClass
{
public void AMethod(int param1)
{
Console.WriteLine(param1);
}
}
}
Another example:
using System;
using System.Threading;
namespace EventExample
{
public class Clock
{
public delegate void TwoSecondsPassedHandler(object clockInstance, TimeEventArgs time);
//Raise event
TwoSecondsPassed(this, new TimeEventArgs(1));
}
}
}
public class TimeEventArgs : EventArgs
{
public TimeEventArgs(int second)
{
seconds += second;
instanceSeconds = seconds;
}
cl.Start();
Console.ReadLine();
}
System.String
41. 41. Write some code to box and unbox a value type.
// Boxing
int i = 4;
object o = i;
// Unboxing
i = (int) o;
There are 2 kinds of heap – 1: a chunk of memory where data is stored and 2: a tree based data structure. When we talk about the heap and the stack we
mean the first kind of heap. The stack is a LIFO data structure that stores variables and flow control information. Typically each thread will have its own stack.
Initializes an object.
They check to see if the references both point to the same object.
Unlike in C++ a struct is not a class – it is a value type with certain restrictions. It is usually best to use a struct to represent simple entities with a few
variables. Like a Point for example which contains variables x and y.
sbyte -128 to 127, byte 0 – 255, short -32,768 to 32,767, int -2,147,483,648 to 2,147,483,647, ulong 0 to 18,446,744,073,709,551,615
false
switch (n)
{
case 1:
x=1;
break;
case 2:
x=2;
break;
default:
goto case 1;
}
Stack
Yes
By default C# does not check for overflow (unless using constants), we can use checked to raise an exception. E.g.:
try
{
z = checked((short)(x + y));
//z = (short)(x + y);
}
catch (System.OverflowException e)
{
System.Console.WriteLine(e.ToString());
}
return z; // Throws the exception OverflowException
}
Then the cast will raise no overflow exception and z will be assigned –2. unchecked can be used in the opposite way, to say avoid compile time errors with
constanst overflow. E.g. the following will cause a compiler error:
Yes
// Implicit
short shrt = 400;
int intgr = shrt;
// Explicit
No
as acts is like a cast but returns a null on conversion failure. Is comares an object to a type and returns a boolean.
60. 60. What is the difference between the new operator and modifier?
The new operator creates an instance of a class whereas the new modifier is used to declare a method with the same name as a method in one of the parent
classes.
typeof obtains the System.Type object for a type and sizeof obtains the size of a type.
double x;
x = 2;
Console.Write(++x);
x = 2;
Console.Write(x++);
Console.Write(x);
Returns
323
64. 64. What are the names of the three types of operators?
65. 65. An operator declaration must include a public and static modifier, can it have other modifiers?
No
No
Certain operators are evaluated before others. Brackets help to avoid confusion.
class TempleCompare
{
A runtime error.
Yes
No
No
catch(NullReferenceException e)
{
Console.WriteLine("{0} exception 1.", e);
}
catch
{
Console.WriteLine("exception 2.");
}
finally
{
Console.WriteLine("finally block.");
}
}
}
78. 78. A block contains a statement list {s1;s2;} what is an empty statement list?
{;}
int n=4;
if (n==1)
Console.WriteLine("n=1");
else if (n==2)
Console.WriteLine("n=2");
else if (n==3)
Console.WriteLine("n=3");
else
Console.WriteLine("n>3");
if (n>0)
if (n2>0)
Console.Write("Dangling Else")
else
Yes
83. 83. Can you increment multiple variables in a for loop control?
int n = 1;
while (n < 6)
{
Console.WriteLine("Current value of n is {0}", n);
n++;
}
int x;
int y = 0;
do
{
x = y++;
Console.WriteLine(x);
}
86. 86. Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with
those values.
int x = 0, y = 0;
int[] arr = new int [] {0,1,2};
using System;
using System.Collections;
public ItemsEnumerator(Items i)
{
this.i = i;
}
public bool MoveNext()
{
if (location < i.contents.Length - 1)
{
location++;
return true;
}
else
{
return false;
}
}
public void Reset()
{
location = -1;
}
public object Current
{
get
{
return i.contents[location];
}
}
}
Break terminates a loop or switch. Continue jumps to the next iteration of an enclosing iteration statement. Goto jumps to a labelled statement.
No
93. 93. Does the size of an array need to be defined at compile time.
No
int[,] b = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {8, 9}};
Yes
using System;
namespace Console1
{
class Class1
{
static void Main(string[] args)
{
MyIndexableClass m = new MyIndexableClass();
Console.WriteLine(m[0]);
Console.WriteLine(m[1]);
Console.WriteLine(m[2]);
Console.ReadLine();
}
}
class MyIndexableClass
{
private string []myData = {"one","two","three"};
Yes
101. 101. Can properties hide base class members of the same name?
Yes
//read-only static
public static int ClassPr
{
get
{
return b;
}
}
Yes
Late binding is using System.object instead of explicitly declaring a class (which is early binding).
Polymorphism is the ability to implement the same operation many times. Each derived method implements the operation inherited from the base class in its
own way.
A namespace declares a scope which is useful for organizing code and to distinguish one type from another.
111. 111. Can nested classes use any of the 5 types of accessibility?
Yes
Yes
System.Object
Reflection allows us to analyze an assembly’s metadata and it gives us a mechanism to do late binding.
System.Reflection
They die when they are pulled off the stack (go out of scope).
No
The using statement defines a scope at the end of which an object will be disposed.
No
No
System.Object
125. 125. Is constructor or destructor inheritance explicit or implicit? What does this mean?
Constructor or destructor inheritance is explicit…. Public Extended : base()à this is called the constructor initializer.
No
Yes
129. 129. In terms of constructors, what is the difference between: public MyDerived() : base() an public MyDerived() in a child class?
Nothing
Yes
131. 131. What keyword would you use for scope name clashes?
this
Yes
Attributes are declarative tags which can be used to mark certain entities (like methods for example).
137. 137. Write code to define and use your own custom attribute.
(From MSDN)
// cs_attributes_retr.cs
using System;
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct,
AllowMultiple=true)]
public class Author : Attribute
{
public Author(string name)
{
this.name = name; version = 1.0;
}
public double version;
string name;
public string GetName()
{
return name;
}
}
138. 138. List some custom attribute scopes and possible targets.
Assembly – assembly
Class – type
#if
#else
#elif
#endif
#define
#undef
#warning
#error
#line
#region
#endregion
140. 140. What is a thread?
A thread is a the entity within a process that Windows schedules for execution. A thread has:
• The contents of a set of CPU registers representing the state of the processor.
• 2 stacks, 1 for the thread to use in kernel mode, and 1 for user mode.
• Private storage called Thread Local Storage for use by subsystems, run-time libraries, and DLLs.
• A thread ID.
Spin off
143. 143. Write code to use threading and the lock keyword.
using System;
using System.Threading;
namespace ConsoleApplication4
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
ThreadClass tc1 = new ThreadClass(1);
ThreadClass tc2 = new ThreadClass(2);
oT1.Start();
oT2.Start();
Console.ReadLine();
}
}
class ThreadClass
{
private static object lockValue = "dummy";
public int threadNumber;
146. 146. What mechanisms does C# have for the readers, writers problem?
A Mutex object is used to guarantee only one thread can access a critical resource an any one time.
Assemblies contain logical units of code in MSIL, metadata, and usually a manifest. Assemblies can be signed and the can dome in the form of a DLL or EXE.
Assembly identity is name, version number, and optional culture, and optional public key to guarantee uniqueness.
Assembly manifest lists all names of public types and resources and their locations in the assembly.
The GAC
DLLs, VBX or OCX files being unavailable or in the wrong versions. Applicatioins using say these older DLLs expect some behaviour which is not present.
/// <value></value>
/// <example></example>
/// <exception cref=""></exception>
/// <include file='' path='[@name=""]'/>
/// <param name="args"></param>
/// <paramref name=""/>
/// <permission cref=""></permission>
/// <remarks>
/// </remarks>
/// <summary>
/// <c></c>
/// <code></code>
/// <list type=""></list>
/// <see cref=""/>
/// <seealso cref=""/>
/// </summary>
158. 158. What is unsafe code?
160. 160. How would you read and write using the console?
161. 161. Give examples of hex, currency, and fixed point console formatting.
Console.Write("{0:X}", 250); à FA
162. 162. Given part of a stack trace: aspnet.debugging.BadForm.Page_Load(Object sender, EventArgs e) +34. What does the +34 mean?
It is an actual offset (at the assembly language level) – not an offset into the IL instructions.
163. 163. Are value types are slower to pass as method parameters?
Yes
System.Text.StringBuilder
A thread pool is a means by which to control a number of threads simultaneously. Thread pools give us thread reuse, rather than creating a new thread every
time.
From
http://msdn.microsoft.com/msdnmag/issues/02/09/SecurityinNET/default.aspx
“Unlike the old principal-based security, the CLR enforces security policy based on where code is coming from rather than who the user is. This model, called
code access security, makes sense in today's environment because so much code is installed over the Internet and even a trusted user doesn't know when
that code is safe.”
167. 167. What’s the difference between camel and pascal casing?
PascalCasing, camelCasing
From
http://www.dictionary.net/marshalling
“The process of packing one or more items of data into a message buffer, prior to transmitting that message buffer over a communication channel. The
packing process not only collects together values which may be stored in non-consecutive memory locations but also converts data of different types into a
standard representation agreed with the recipient of the message.”
From
http://www.dofactory.com/Patterns/Patterns.aspx
“Design patterns are recurring solutions to software design problems you find again and again in real-world application development.”
From
http://www.dofactory.com/Patterns/Patterns.aspx
Creational Patterns
Structural Patterns
Behavioral Patterns
Chain of Resp. A way of passing a request between a chain of objects
173.173. What are the different diagrams in UML? What are they used for?
From
http://www.developer.com/design/article.php/1553851
• “Use case diagram: The use case diagram is used to identify the primary elements and processes that form the system. The primary elements are
termed as "actors" and the processes are called "use cases." The use case diagram shows which actors interact with each use case.
• Class diagram: The class diagram is used to refine the use case diagram and define a detailed design of the system. The class diagram classifies
the actors defined in the use case diagram into a set of interrelated classes. The relationship or association between the classes can be either an
"is-a" or "has-a" relationship. Each class in the class diagram may be capable of providing certain functionalities. These functionalities provided by
the class are termed "methods" of the class. Apart from this, each class may have certain "attributes" that uniquely identify the class.
• Object diagram: The object diagram is a special kind of class diagram. An object is an instance of a class. This essentially means that an object
represents the state of a class at a given point of time while the system is running. The object diagram captures the state of different classes in the
system and their relationships or associations at a given point of time.
• State diagram: A state diagram, as the name suggests, represents the different states that objects in the system undergo during their life cycle.
Objects in the system change states in response to events. In addition to this, a state diagram also captures the transition of the object's state from
an initial state to a final state in response to events affecting the system.
• Activity diagram: The process flows in the system are captured in the activity diagram. Similar to a state diagram, an activity diagram also
consists of activities, actions, transitions, initial and final states, and guard conditions.
• Sequence diagram: A sequence diagram represents the interaction between different objects in the system. The important aspect of a sequence
diagram is that it is time-ordered. This means that the exact sequence of the interactions between the objects is represented step by step. Different
objects in the sequence diagram interact with each other by passing "messages".
• Collaboration diagram: A collaboration diagram groups together the interactions between different objects. The interactions are listed as
numbered interactions that help to trace the sequence of the interactions. The collaboration diagram helps to identify all the possible interactions
that each object has with other objects.
• Component diagram: The component diagram represents the high-level parts that make up the system. This diagram depicts, at a high level, what
components form part of the system and how they are interrelated. A component diagram depicts the components culled after the system has
undergone the development or construction phase.
• Deployment diagram: The deployment diagram captures the configuration of the runtime elements of the application. This diagram is by far most
useful when a system is built and ready to be deployed.”
1. tasa Says:
October 19th, 2004 at 5:50 am
The question number 10 isn’t correct. The class given in the question can’t be created under any circumstances. The c’tor in private so no instance
can be created and the Instance() func isn’t static, so it can’t be called without instance of the class. It’s Singleton pattern only if the Instance() func
is static and private member A is static too.
Well spotted. I’ll issue a change correcting this ‘deliberate’ mistake ;¬)
3. Chandra Says:
October 21st, 2004 at 4:49 pm
6. ziv Says:
March 20th, 2006 at 4:12 pm
……………
1. 1. What is MSIL?
Microsoft Intermediate Language (MSIL) is the CPU-independent instruction set generated by .NET compilers from .NET languages such as J#, C# or Visual
Basic. MSIL is compiled before or during execution of the program by a Virtual Execution System (VES), which is part of the Common Language Runtime
module (CLR).
The JVM can either interpret or just-in-time compile the byte code. The CLR always compiles to native code. Another is that the CLR supports unmanaged
code, known as “unsafe”, where the programmer assumes the responsibility for managing memory and can do pointer arithmetic and so forth.
3. 3. What is WinFX?
The new Windows API that will be released with the Microsoft Longhorn Operating System. This will include features for Avalon, Indigo, and WinFS as well as
a number of fundamental routines.
4. 4. What is Indigo?
The code name for the communications portion of Longhorn that is built around Web services. This communications technology focuses on providing
spanning transports, security, messaging patterns, encoding, networking and hosting, and more.
From http://www.kippsoftware.com/san200405.htm
• The developer first instantiates locally a proxy interface to the remote assembly. Local code calls a method of the proxy
• The .NET platform calls the corresponding method on the remote server and returns the results (see figure).
• Developers can use TCP or HTTP remoting.
• Remoting makes use of Leases and allocations to improve efficiency.
A set of functions that adhere to Microsoft’s Patterns and Practices guidelines. These functions include:
Caching Application Block, Configuration Application Block, Data Access Application Block, Cryptography Application Block, Exception Handling Application
Block, Logging and Instrumentation Application Block and the Security Application Block.
8. 8. Discuss System.Collections
8 – 24 From http://msdn.microsoft.com/
The System.Collections namespace contains interfaces and classes that define various collections of objects, such as lists, queues, bit arrays, hashtables
and dictionaries.
9. 9. Discuss System.Configuration
The System.Configuration namespace provides classes and interfaces that allow you to programmatically access .NET Framework configuration settings
and handle errors in configuration files (.config files).
The System.Data namespace consists mostly of the classes that constitute the ADO.NET architecture.
The System.Diagnostics namespace provides classes that allow you to interact with system processes, event logs, and performance counters.
The System.DirectoryServices namespace provides easy access to Active Directory from managed code.
The System.EnterpriseServices namespace provides an important infrastructure for enterprise applications. COM+ provides a services architecture for
component programming models deployed in an enterprise environment. This namespace provides .NET objects with access to COM+ services making the
.NET Framework objects more practical for enterprise applications.
The System.Globalization namespace contains classes that define culture-related information, including the language, the country/region, the calendars in
use, the format patterns for dates, currency, and numbers, and the sort order for strings.
The System.IO namespace contains types that allow reading and writing to files and data streams, and types that provide basic file and directory support.
The System.Net namespace provides a simple programming interface for many of the protocols used on networks today.
The System.Security namespace provides the underlying structure of the common language runtime security system, including base classes for
permissions.
The System.Text namespace contains classes representing ASCII, Unicode, UTF-7, and UTF-8 character encodings; abstract base classes for converting
blocks of characters to and from blocks of bytes; and a helper class that manipulates and formats String objects without creating intermediate instances of
String.
The System.Threading namespace provides classes and interfaces that enable multithreaded programming.
22. 22. Discuss System.Web
The System.Web namespace supplies classes and interfaces that enable browser-server communication.
25. 25. Does VS.NET 2003 have a web browser (think about it)?
Yes
Overview
J2EE is a set of non-vendor specific standards for developing “fat” and “thin” applications and services, J2EE is mainly directed
at “thin” clients. These standards are the collaborative effort of more than 400 companies.
.net is a tangible set of software and services designed to run on the Windows platform. The .net software and services also
allow the design and implementation of enterprise and non-enterprise applications. Equal emphasis has been given to “fat” and
“thin” clients. .net was developed exclusively by Microsoft.
Virtual Machines
Both .net and J2EE use a Virtual Machine to interpret intermediate code. With J2EE this intermediate code is called “Byte Code”. With .net the code is
called the “Intermediate Language”. When Java or .net code is written and compiled it compiles to intermediate code.
With J2EE the JVM (Java Virtual Machine) interprets its byte code line by line into the machine’s native language. J2EE byte
code can be compiled directly to native machine code or JIT (Just In Time) compiled, but the vast majority of J2EE applications
are interpreted.
The .NET virtual machine, the CLR (Common Language Runtime) uses a JIT compiler to compile blocks of IL code into native
machine code at run time. Visual Studio.net can also compile directly to native code.
Programming Languages
Both platforms have the option of using multiple programming languages for an enterprise application, although this is a much easier task to achieve with the
.net platform.
The J2EE standard is based on Java, so applications are mainly developed in Java. Interoperability is possible through JNI
(Java Native interface) and CORBA (Common Object Request Broker Architecture). The latter is almost never done as the APIs
are complicated and time consuming.
.net supports the seamless integration of over 20 languages, this is done via strong typing, common interfaces and a concept
called “managed code”. On the down side, the language differences are largely semantic (VB.NET vs. C#). Also, languages like
C++ require extra imports (managed extensions).
Operating Systems
Both .NET and J2EE have pretensions to having portable source code.
J2EE is by far the best for portability, the whole specification is designed as to be non-vendor specific. In practice though, Java
source is often not portable without modifications.
.net has promised that the CLR and core languages like C# will eventually be portable. At present .net only runs on Windows.
An enterprise application can be logically separated into 3 tiers - Presentation, Business Logic, and the Data tier.
Presentation Tier
Both .net and J2EE use a scripting language at the presentation tier for “thin” clients or “Web Applications”. They also have similar ways of generating this
tier for “fat” client applications.
For “thin” client applications J2EE uses Java Servlets and a derivative of ASP (Active Server Pages) called JSP (Java Server
Pages), which intermingles HTML with Java based script. Calls to Business logic components (EJB - Enterprise Java Beans)
are made from these JSP pages. Coding the page to render on a number of different “thin” clients must be done manually. For
“fat” clients there is the Java Swing API, with a set of standard java beans and a number of different GUIs to build applications
with.
.net uses Visual Studio.net for both “thin” and “fat” clients. .net “thin” client applications use the ASP.NET scripting language.
ASP.NET can be used in the traditional script based way, but Microsoft encourages the use of a “Code Behind Page”. One
simply drags and drops various “Web Controls” onto an ASP.NET (.aspx) page and then uses the code behind page to adjust
those controls programmatically. When an .aspx page is requested by a “thin” client the page is rendered automatically by the
.net runtime which checks the type of “thin” client and adjusts each control accordingly. The result is that an .aspx page can
render on any supported “thin” client without any extra work. This has a down side, that being that the look n’ feel of each page
is limited by the controls offered. Microsoft’s IIS server also has legacy support for ASP, so ASP.NET and ASP can be used in
conjunction with each other. For “fat” clients the process is the same except that there is a different set of controls for a
“Windows Form” (as opposed to a “Web Form”).
The two technologies are very similar on this level with each borrowing concepts from the other.
Java Beans are the basic components (defined properties, event handling and persistence). EJB are the distributed equivalents
that have extra functions for application level security, distributed transactions, life cycle management and resource pooling. The
java runtime handles the life cycle of each component, deciding when to destroy a component (garbage collection) and what
memory it can access (sandbox security).
.net uses an enriched version of COM+ (assemblies) which gives its components all of the above functions with the addition of
newer concepts like extensible meta-data for each assembly. Like J2EE the “registration” of components is much easier with a
new deployment model and .net projects also support traditional COM and COM+ components. Perhaps the biggest difference
is the ability to go into “unmanaged mode” which allows the application to access areas of memory normally inaccessible via
the CLR Sandbox.
Data Tier
For relational database access J2EE uses JDBC (Java Database Connection) – which is based on Microsoft’s ODBC (Open
Database Connectivity). At a higher level it is conceptually the same as ADO (ActiveX Data Objects - which sits on top of
ODBC) with connections, statements and Result sets. JDBC does perform better than ADO. For Naming and Directory Services
J2EE uses JNDI (Java Naming and Directory Interface) and JDBC does not support hierarchical Database access.
.net uses ADO.NET , it has all the ADO functionality and more. All data transmission from source to component is now done via
XML (eXtensible Markup Language). This means that ADO.NET can use ANYTHING that emits XML data in the ADO.NET
schema as a data source. ADO.NET supports hierarchical data access, and naming and directory services are accessed via
ADSI (Active Directory Services Interface).
Web services and remoting are web and TCP/IP based remotely callable functions that sit on top of a predetermined protocol.
J2EE’s web services run with a host of different protocols. They run with HTTP, RMI/JRMP (Remote Method Invocation / Java
Remote Method Protocol) or IIOP (Internet InterORB Protocol).
.net web services run exclusively on HTTP with a SOAP (Simple Object Access Protocol) wrapper. All data interchange is done
with XML. Web services in .net are all standardised with XML interfaces. Remoting uses either SOAP or TCP/IP directly. The
entire .net framework is very XML centric.
Performance
In an enterprise environment .net outperforms J2EE. Benchmarks show that it is more scalable, efficient, faster to run and develop, easier to use and cheaper
- sometimes by a factor of five. .net is designed to work just as well in a non-enterprise environment (pointers, unmanaged code, etc.). J2EE is rarely used in
a non-enterprise environment to write graphically or numerically intensive code for executables.
28. 28. What benefit do you have by implementing IDisposable interface in .NET?
29. 29. Explain the difference between the Application object and Session object in ASP.NET.
The Application object affects all users of the application whereas a session only affects one (the session holder).
30. 30. Explain the difference between User controls and Custom controls in ASP.NET.
From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconwebusercontrolsvscustomwebcontrols.asp
Limited support for consumers who use a visual design tool Full visual design tool support for consumers
A separate copy of the control is required in each application Only a single copy of the control is required, in the global assembly cache
Cannot be added to the Toolbox in Visual Studio Can be added to the Toolbox in Visual Studio
// Start transaction.
SqlTransaction myTransaction = myConnection.BeginTransaction();
BEGIN TRAN A
UPDATE mytable
UPDATE mytable2
SELECT * frommytable
COMMIT TRAN B
A secure unit of processing that the Common Language Runtime uses to provide isolation between applications.
From http://www.faqts.com/knowledge_base/view.phtml/aid/8188/fid/87
An index is a list of sorted record pointers based on a column. Having indexes on your database tables will speed up SELECT queries if it is properly applied.
Indexes will take up some disk space and will slow down INSERT and UPDATE queries.
35. 35. What is optimistic vs. pessimistic locking?
From http://blogs.msdn.com/ricom/archive/2004/06/24/165063.aspx
Optimistic locking -- that's where you assume things will go well and design your locks so that they handle conflicts as the exceptional case
Pessimistic locking -- the converse where you assume conflicts are likely and create some kind of reservation system where sections are locked while they
are edited
36. 36. What is the difference between a clustered and non-clustered index.
From http://www.dotnetspider.com/technology/kbpages/1140.aspx
- The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index
is the actual data and the data is resorted in case of clustered index.
Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on
the db.
This object type is the most prevalent and is recommended by Microsoft for use as the primary remoting type. Server activated Singlecall objects hold no
state, which makes them ideal for use with clustered web servers, object pooling, and all other sorts of useful things. Since there is no state held in the
object, you have to pass all the data that the object needs to do its work on every call.
These objects are used when you need both a stateful object AND you need that objects data to persist over time and multiple instantiation. If 3 computers
instance an SAO Singleton on a server, they will all get a reference to that same object. Singletons are commonly used to direct access to scarce resources
and should generally be avoided when possible.
CAO Objects are used when you need an object to be stateful throughout its lifetime to its caller. CAO Objects persist data to their caller, however they are
different from SAO Singletons in that multiple instantiations of a CAO will get brand new instances of that CAO each time.
39. Write some code to use reflection, remoting, threading, and thread synchronization.
using System;
using System.Reflection;
using System.Threading;
namespace Example
{
public class allThreads
{
const int NUMBER_OF_OPS = 10;
const int SLEEP_TIME = 2000;
// Thread with critical data access section using lock and global object
while(producing)
{
// Synch using monitor
if(bufferCount == 1)
{
/* Release the lock on this object and block
* the current thread until it reacquires the lock. */
Monitor.Wait(this);
}
threadGlobalDS +=1;
++bufferCount;
if (threadGlobalDS == MAX_PRODUCED)
{
producing = false;
}
/* Notify a thread in the waiting
* queue of a change in the locked object's state (this object). */
Monitor.Pulse(this);
if(bufferCount == 0)
{
Monitor.Wait(this);
}
--bufferCount;
System.Console.WriteLine("--> Consumed " + threadGlobalDS.ToString());
Monitor.Pulse(this);
Monitor.Exit(this);
if (!producing)
{
consuming = false;
}
}
}
}
// Class to be remoted
public RemotingLoader()
{
System.Console.WriteLine("New Client Added");
}
thread1.Start();
thread2.Start();
thread3.Start();
if (!thread1.IsAlive)
{
System.Console.WriteLine("*-> Thread 1 is dead");
}
// Monitor example
monitorThreads monitorObj = new monitorThreads();
monitorThread1.Start();
monitorThread2.Start();
monitorThread1.Join();
monitorThread2.Join();
thread1.Join();
thread2.Join();
thread3.Join();
System.Console.WriteLine("*-> Finished");
// Class to be serialized
[Serializable]
public class SomeMetadata
{
public Type objectType;
public ConstructorInfo [] info;
public MethodInfo [] methods;
decimal remoteObjectID;
Server
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
namespace Example
{
public class RemotingServer
{
public static void Main(String[] args)
{
// Register Channel
TcpServerChannel channel = new TcpServerChannel(9000);
ChannelServices.RegisterChannel(channel);
// Wait
System.Console.WriteLine("Press Any Key To Kill The Server");
System.Console.ReadLine();
}
}
}
Client
using System;
using System.Reflection;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
namespace Example
{
public class RemotingClient
{
public static void Main(string[] args)
{
// Register channel and point to remote object
ChannelServices.RegisterChannel(new TcpClientChannel());
RemotingLoader loader = (RemotingLoader)Activator.GetObject(
typeof(RemotingLoader), "tcp://localhost:9000/RemotingLoader");
Console.WriteLine(objReference.objectType);
Console.WriteLine("");
Console.WriteLine("*--- Constructor Info. ---*");
Console.WriteLine("");
Console.WriteLine("");
Console.WriteLine("*--- Method Info. ---*");
Console.WriteLine("");
Console.WriteLine("");
Console.WriteLine("*--- Setting and getting a Remote Variable. ---*");
Console.WriteLine("");
// Wait...
Console.ReadLine();
}
}
}
Misc
1. 1. Can you prevent your class from being inherited by another class?
Yes. The keyword “sealed” will prevent the class from being inherited.
Presentation (UI), business (logic and underlying code) and data (from storage or other sources).
3. 3. What is SOA?
Service Oriented Architecture. In SOA you create an abstract layer that your applications use to access various "services" and can aggregate the services.
These services could be databases, web services, message queues or other sources. The Service Layer provides a way to access these services that the
applications do not need to know how the access is done. For example, to get a full customer record, I might need to get data from a SGL Server database, a
web service and a message queue. The Service layer hides this from the calling application. All the application knows is that it asked for a full customer
record. It doesn't know what system or systems it came from or how it was retrieved.
4. 4. Is XML case-sensitive?
Yes
5. 5. Can you explain some differences between an ADO.NET Dataset and an ADO Recordset? (Or describe some features of a Dataset).
A DataSet can represent an entire relational database in memory, complete with tables, relations, and views. A DataSet is designed to work without any
continuing connection to the original data source. Data in a DataSet is bulk-loaded, rather than being loaded on demand. There's no concept of cursor types
in a DataSet. DataSets have no current record pointer You can use For Each loops to move through the data. You can store many edits in a DataSet, and
write them to the original data source in a single operation. Though the DataSet is universal, other objects in ADO.NET come in different versions for different
data sources.
ASP.NET
Server-side code executes on the server. Client-side code executes in the context of the clients' browser.
2. 2. What does the "EnableViewState" property do? Why would I want it on or off?
It allows page objects to save their state in a Base64 encoded string in the page HTML. One should only have it enabled when needed because it adds to the
page size and can get fairly large for complex pages with many controls. (It takes longer to download the page).
3. 3. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Server.Transfer transfers excution directly to another page. Response.Redirect sends a response to the client and directs the client (the browser) to load the
new page (it causes a roundtrip). If you don't need to execute code on the client, Transfer is more efficient.
(Web Services Description Language). It describes the interfaces and other information of a web service.
6. 6. Which WebForm Validator control would you use if you needed to make sure the values in two different WebForm controls matched?
CompareValidator Control.
7. 7. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the
Repeater control?
You must set the DataSource property and call the DataBind method.
* Encapsulation describes the ability of an object to hide its data and methods from the rest of the world. (Google web definitions).
No.
The first one performs a deep copy of the array, the second one is shallow. A shallow copy of an Array copies only the elements of the Array, whether they
are reference types or value types, but it does not copy the objects that the references refer to. The references in the new Array point to the same objects
that the references in the original Array point to. In contrast, a deep copy of an Array copies the elements and everything directly or indirectly referenced by
the elements.
3. 3. How can you sort the elements of the array in descending order?
4. 4. What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable.
A sorted HashTable.
6. 6. Will the finally block get executed if an exception has not occurred?
Yes
7. 7. Can you prevent your class from being inherited by another class?
Yes. The keyword “sealed” will prevent the class from being inherited
8. 8. If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you
enforce a call from an inherited constructor to a specific base constructor?
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the
inherited class.
10. 10. What’s the difference between // comments, /* */ comments and /// comments?
11. 11. How do you generate documentation from the C# file commented properly with a command-line compiler?
12. 12. What debugging tools come with the .NET SDK?
.CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. DbgCLR – graphic debugger. Visual
Studio .NET uses the DbgCLR.
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without
any interruption if the condition is true.
14. 14. What’s the difference between the Debug class and Trace class?
Use Debug class for debug builds, use Trace class for both debug and release builds.
The tracing dumps can be quite verbose. For applications that are constantly running you run the risk of overloading the machine and the hard drive. Five
levels range from None to Verbose, allowing you to fine-tune the tracing activities.
18. 18. What are three test cases you should go through in unit testing?
19. 19. Can you change the value of a variable while debugging a C# application?
Yes. If you are debugging via Visual Studio.NET, just go to Immediate window.
20. 20. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing
other sources, like Oracle, DB2, Microsoft Access and Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as
SqlServer.NET.
Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would
involve ‘La%’.
23. 23. Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted,
since SQL Server is the only verifier participating in the transaction.
An Assembly.
…………
• Adel Khalil
• Yehia Megahed
• Hisham Abd El-Hafez
• Mohammed Hossam
Q3: Describe the Asp.net pipeline ? Give an Example when you need to extend it? How do you do so?
A3: http://msdn.microsoft.com/msdnmag/issues/02/09/HTTPPipelines/
Q9: What do you know about ATLAS (Microsoft ASP.net AJAX Extensions) ?
A9: for more information check here, http://ajax.asp.net
Q19: Without using the multiplication or addition operations, how can you multiply a number x by 8?
A19: Shift x to the left 3 times, x << 3, because every shift left multiplies the number by 2
Q20: What is the difference between ASP.net 1.x & ASP.net 2.0 ?
A20: Any answer that include stuff like Provider model (membership provider, role provider ... etc) and Master Pages, Code Beside model, new web controls
will be ok.
If you have more questions feel free to join the user group and add them directly to the database.
Comments
11-How can you sort the elements of the array in descending order?
-By calling Sort() and then Reverse() methods.
12-What happens if you inherit multiple interfaces and they have conflicting method names?
-It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale
if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
To Do: Investigate
13-If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an
inherited constructor to a specific base constructor?
-Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the
inherited class.
-Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the
assembly.