Job interviews are always stressful and they are tough enough to make fresher and even experienced one feel nervous and scary of the interview. Technical-interviews.com has been developed to help students and jobseekers to prepare for the tough job interview questions shot at them. Review the job interview questions and answers on networking basics, load runner, winrunner, .net, vb, java, oracle and many more common job interview questions online here. You have just made the first step to build the foundation for a successful interview by reviewing Technical-interviews.com.

C# and Dot Net Interview Questions V

Which method is actually called ultimately when Console.WriteLine( ) is invoked

AppendFormat() method is called.

 

What happens when you create an arraylist as ArrayList Arr=new ArrayList()

Once it will reach size 16 addding element in the arraylist, it will be automatically double the size.

 

What is the output of Vectors.RemoveAt(1)

Removes the object at position 1

 

GetEnumerator( ) of Ienumerable interface returns

GetEnumerator() returns a reference to System.Collections.Ienumerator class which allows a simple iteration over a collection

 

How do you add objects to hashtable

C# and Dot Net Interview Questions IV

Which method is implicitly called when an object is created

When an object is created Constructor is get called first. A default constructor is created automatically if we do not create a constructor inside a class.

 

Which of the following statement is invalid with regards to constructor

Constructors should have the same name as class name

Constructors have to be public so that class can be instantiated

Constructors can not be overloaded

 

Constructors can not be static

C# supports two types of constructor, a class constructor (static constructor) and an instance constructor (non-static constructor).

C# and Dot Net Interview Questions II

What is XML Schema?

Document Type Declaration(DTD)

<!DOCTYPE root-element [ doctype-declaration… ]>

determines the name of the root element and contains the document type declarations

Elements

Elements are the main building blocks of both XML and HTML documents.

Examples of HTML elements are “body” and “table”. Examples of XML elements could be “note” and “message”. Elements can contain text, other elements, or be empty. Examples of empty HTML elements are “hr”, “br” and “img”.

Examples:

<body>body text in between</body>

<message>some message in between</message>

———–

Attributes

Attributes provide extra information about elements.

C# and Dot Net Interview Questions III

How to find exceptions in database

If program successfully complie . but program is not run or execute.then give an exception.

 

How can objects be late bound in .NET?

Instead of using new keyword we can use create object like in this example we are creating object to write in excel sheet through our programexampleImports Excel = Microsoft.Office.Interop.ExcelPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objApp As Object Dim objBook As Object Dim objBooks As Object Dim objSheets As Object Dim objSheet As Object Dim range As Object ‘ Instantiate Excel and start a new workbook. objApp = CreateObject(”Excel.Application”) objBooks = objApp.Workbooks objBook = objBooks.Add objSheets = objBook.Worksheets objSheet = objSheets.Item(1) range = objSheet.Range(”A1″) ‘Set the range value. range.Value = “Hello, World!” ‘Return control of Excel to the user. objApp.Visible = True objApp.UserControl = TrueEnd Sub

C# Interview Questions III

What is the difference between shadow and override?

Overriding is used to redefines only the methods.but shadowing redefines the entire element.

 

You have an event handler called MyEvent and you want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?

control.Click += new EventHandler(MyEvent)

 

Which debugging window allows you to see the methods called in the order they were called?

The call stack.

 

Which debugging window allows you to see all the name and values of all the variables in scope?

Pages (98): « First ... « 1 2 3 [4] 5 6 7 » ... Last »