Explain the use of abstraction with an
example using C#.NET.
Latest answer: Abstraction is used to create a common set of
methods that might have different specific implementations by subclasses.
Abstract class cannot be instantiated and consists of abstract methods without
any implementations.................
Read answer
Latest answer: Encapsulation hides the internal state and
behavior of an object. Encapsulation if used with access modifiers such as
private, public, protected. It provides a way to protect data..................
Read answer
Latest answer: Class data in terms of static class is the data
that particular class holds in its structure. Instances can refer to different
objects of the same class................
Read
answer
Latest answer: Static methods are used when we want only one
copy of that method to perform action and remain active at a single point in
time.................
Read
answer
Latest answer: Boxing and Unboxing are used to convert value
types into reference types and vice versa. Developers often need to make some
methods generic and hence create methods that accept objects rather than
specific value types..................
Read answer
Latest answer: Finally statement is executed always
irrespective of any condition or error occurring in a method. It is often used
to cleanup code...............
Read
answer
Latest answer: Add a project from templates called “Class
Library”
Optionally in property pages of this project set the output type to Class
Library....................
Read
answer
Latest answer: Satellite assemblies are resource assemblies
specific to language/culture. Different resource files are created for
different languages/cultures and then the needed one is loaded based on the
user................
Read answer
Latest answer: Use ResourceManager class to retrieve resources
that exist in an assembly. Steps to do so are:..................
Read
answer
Latest answer: System.Globalization namespace contains
CultureInfo class. This class provides information about a specific culture,
i.e. datetime format, currency, language etc.....................
Read
answer
Latest answer: The NumberFormatInfo class is used to define how
symbols, currencies etc are formatted based on specific
cultures..................
Read answer
Latest answer: Implementation consists of basically translating
the UI,set the culture and UI culture for an application make the following
entry in the web.config ..............
Read
answer
Latest answer: Trace listeners are objects that are used to
receive store and route tracing information. The trace listener decides the
final destination where the tracing information is routed to. .............
Read answer
Latest answer: In web.config, set EnableTracing=”true”
System.Diagnostics.Trace.WriteLine ("Error in Method1.");............
Read answer<
/P>
Latest answer: Call stack: This window provides a description
for the flow of application till the current line where the debugger is
pointing to..............
Read answer
Latest answer: Assert:This method checks for a condition. It
displays a user message if the condition is false. Write:used to write
information which will be used by Trace Listeners...............
Read answer
Latest answer: Add a new “Web setup project” from setup and
deployment project templates..........
Read
answer
Latest answer: Add a websetup project to the application
solution.
Customize it to make UI changes, registry entries, installation path etc
information..........
Read
answer
Latest answer: sn -k StrongNameFile.snk – creates a strong key
b. [assembly:AssemblyKeyFile("StrongNameFile.snk")] – tag the assembly wid he
string key..................
Read
answer
Latest answer: xcopy c:\Inetpub\wwwroot\app1
\\RemoteServer\DeploymentDirectory\Webapp /E /K /R /O /H /I...............
Read
answer
Explain the methods
of windows-based authentication.
Latest answer: Anonymous authentication gives access to
read-only areas of the Web site which do not need any username and
password................
Read answer
Latest answer: a. Create a windows form called the basewindow
b. Add a menu bar on this form
c. Right click on the solution explorer and select add new item................
Read answer
Latest answer: a. Load: fired when form is first loaded in the
application
b. Activated: fired whenever the form gets the focus i.e. when loaded first
time, restored from the minimize state, whenever the form is brought in
front................
Read answer
Latest answer: MenuItem item1=new MenuItem();................
Read answer
Latest answer: Anchoring: used to resize controls dynamically
with the form.
Docking: to adhere to the edges of its container..................
Read answer
Latest answer: It is a control to provide a feedback about
another control that has an error. It allows user to see where the error is by
displaying a blinking icon in front of the control...............
Read
answer
Latest answer: Common controls: textbox, button etc
Containers: Controls to group other controls, e.g.: GroupBox, Panel etc.
Menus & toolbars: various menus, toolstips.................
Read
answer
Latest answer: Steps to create a Composite control:
a. Select a project
b. Right click and add a new item (User Control - .ascx) to the selected
project...............
Read
answer
Latest answer: Create Activex Control that needs license at
runtime................
Read answer
Latest answer: They are the assemblies which can be uniquely
identified by attaching the strong name to the dll name. It gives a unique name
to each assembly of various versions. This allows solving the DLL hell
problem....................
Read
answer
Latest answer: Merge Module Project: Allows the package of the
components to be shared between multiple applications................
Read answer
Latest answer: Application Coniguration: They contain
configuration settings specific to applications. These files provide a way of
overriding the metadata in assemblies without having to rebuild the
application.................
Read
answer
Latest answer: Knowing when to use StringBuilder, Comparing
Non-Case-Sensitive Strings............
Read
answer
Latest answer: Code access security is a mechanism that helps
limit the access to the code by protecting the resources. It defines
permissions which tell about the rights to access various. It also imposes
restrictions on code at run time..............
Read
answer
Latest answer: Application that provide access to its data
based on credentials check, verify the user’s role and hands over the access on
the basis of such roles..............
Read answer
Latest answer: To deploy the XML Web service, once can add a
Web Setup project using project templates or use xcopy to copy the files from
the source to the destination server..............
Read
answer
Latest answer: Secure the transport layer,Implement XML
filtering,Mask internal resources .........
Read
answer
Latest answer: a) Use System.Runtime.InteropServices.
b) Use DllImport to declare the unmanaged procedure...........
Read answer
|