What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 43428 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > C# Interview Questions

Now you don't need go anywhere to get the best interview questions on Microsoft technology. We are trying to gather all real interview questions asked from MNCs and put them here. You can also assist us in doing so by submitting .net interview questions. These questions are generally different from certification questions however it may help you in that too.



Page copy protected against web site content infringement by Copyscape
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.

Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.

The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

By calling Array.Sort() and then Array.Reverse() methods.

A sorted HashTable.

Yes. The keyword “sealed” will prevent the class from being inherited.

Yes. Just leave the class public and make the method sealed.

Different parameter data types, different number of parameters, different order of parameters.

We can use pass it with ExecuteReader method of Command object like

reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

This will make sure that when we are calling reader.Close() the associated connection object will also be closed.

int m_PersonID = 0;

public int PersonID
{
get { return m_PersonID; }
set { m_PersonID = value; }
}

DateTime DateOfBirth { get;set;}
int Age { get;set;}
string FirstName { get;set;}


As this is an Interface, so no implementation required only definition of properties are required. Implementation of these properties will be written into the class inherting this interface.

void Calculate();
int Insert(string firstName, string lastName, int age);

Interface doesn't contain implementation so methods implementation will be written into class inherting this interface.

Lets say you have to load the assembly from GAC on button click event then you should write following method.

protected void btn_Click(object sender, EventArgs e)


{

AssemblyName asm = new AssemblyName("ClassLibrary1, Version=1.1.0.0, Culture=neutral,
PublicKeyToken=fbc28d9ca2fc8db5");

Assembly al = Assembly.Load(asm);



Type t = al.GetType("ClassLibrary1.Class1");

MethodInfo m = t.GetMethod("Method1");

str = "reflection - " + (string)m.Invoke(null, null);

MessageBox.Show(str);

}


For more visit http://www.infosysblogs.com/microsoft/2007/04/loading_multiple_versions_of_s.html

Dispose is a method for realse from the memory for an object.

For eg:

<object>.Dispose.

Finalize is used to fire when the object is going to realize the memory.We can set a alert message to says that this object is going to dispose.

The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

Found this useful, bookmark this page link to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape
Navigate to Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | ... | 37 |

 More Exclusive C# Interview Questions and Answers here


Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 6:31:49 AM