Online Job Hunter An online portal brought to you by MARRS INFO SOLUTIONS PVT LTD.

Archives

Most Hits
Tech Interview 

Last Added
Tech Interview 

Lucky Pick
Tech Interview 
Home arrow Tech Interview
Tech Interview PDF Print E-mail
User Rating: / 1
PoorBest 
 

91. So how do you retrieve the customized properties of a .NET application from XML .config file?

 

Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable.

 

92. Can you automate this process?

 

In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval.

 

93. What is the safest way to deploy a Windows Forms app?

 

Web deployment: the user always downloads the latest version of the code; the program runs within security sandbox, properly written app will not require additional security privileges.

 

94. Why is it not a good idea to insert code into Initialize Component method when working with Visual Studio?

 

The designers will likely through it away, most of the code inside Initialize Component is auto-generated.

 

95. What’s the difference between WindowsDefaultLocation and WindowsDefaultBounds?

 

WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS.

 

96. What’s the difference between Move and LocationChanged? Resize and SizeChanged?

 

Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#.

 

97. How would you create a non-rectangular window, let’s say an ellipse?

 

 Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form.

 

98. How do you create a separator in the Menu Designer?

 

A hyphen ?-? would do it. Also, an ampersand ?&? would underline the next letter.

 

99. How’s anchoring different from docking?

 

Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.

 

100. My progress bar freezes up and dialog window shows blank, when an intensive background process takes over.

 

Yes, you should’ve multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other.

 




 
Copyright © 2008-2012. All Rights Reserved. Powered by MARRS INFO SOLUTIONS