C#

What are the access-specifiers available in c#?

Private, Protected, Public, Internal, Protected Internal.

Does C# support multiple inheritance?

No, use interfaces instead

What is a satellite Assembly?

1. A peripheral assembly designed to monitor permissions requests from an application. 2. Any DLL file used by an EXE file. 3. An assembly containing localized resources for another assembly. 4. An assembly designed to alter the appearance or ‘skin’ of an application.

What is a delegate?

1. A strongly typed function pointer. 2. A light weight thread or process that can call a single method. 3. A reference to an object in a different process. 4. An inter-process message channel.

Which “Gang of Four” design pattern is shown below?

public class A { private A instance; private A() { } public static A Instance { get { if ( A == null ) A = new A(); return instance; } } }

1. Factory 2. Abstract Factory 3. Singleton 4. Builder

In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?

1. TestAttribute 2. TestClassAttribute 3. TestFixtureAttribute 4. NUnitTestClassAttribute

Which of the following operations can you NOT perform on an ADO.NET DataSet?

1. A DataSet can be synchronised with the database. 2. A DataSet can be synchronised with a RecordSet. 3. A DataSet can be converted to XML. 4. You can infer the schema from a DataSet.

In Object Oriented Programming, how would you describe encapsulation?

1. The conversion of one type of object to another. 2. The runtime resolution of method calls. 3. The exposition of data. 4. The separation of interface and implementation.

What’s the difference between the System.Web.UI.WebControls.DataGrid and and System.Windows.Forms.DataGrid?

The Web UI control does not inherently support master-detail data structures. As with other Web server controls, it does not support two-way data binding. If you want to update data, you must write code to do this yourself. You can only edit one row at a time. It does not inherently support sorting, although it raises events you can handle in order to sort the grid contents. You can bind the Web Forms DataGrid to any object that supports the IEnumerable interface. The Web Forms DataGrid control supports paging. It is easy to customize the appearance and layout of the More >

Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

There is no way to restrict to a namespace. Namespaces are never units of protection. But if you’re using assemblies, you can use the ‘internal’ access modifier to restrict access to only within the assembly.