Describe an operator from each of these categories:

1 Answer

Answer :

Arithmetic: +

Logical (boolean and bitwise): &

String concatenation: +

Increment, decrement: ++

Shift: >>

Relational: ==

Assignment: =

Member access: .

Indexing: []

Cast: ()

Conditional: ?:

Delegate concatenation and removal: +

Object creation: new

Type information: as

Overflow exception control: checked

Indirection and Address: *

Related questions

Description : Name 3 categories of predefined attributes. 

Last Answer : COM Interop, Transaction, Visual Designer Component Builder 

Description : Write some code to overload an operator. 

Last Answer : class TempleCompare { public int templeCompareID; public int templeValue; public static bool operator == (TempleCompare x, TempleCompare y) { return (x.templeValue == y.templeValue); } ... templeValue); } public override int GetHashCode() { return templeCompareID; } }

Description : What does operator order of precedence mean? 

Last Answer : Certain operators are evaluated before others. Brackets help to avoid confusion. 

Description : Can operator parameters be reference parameters?

Last Answer : No

Description : An operator declaration must include a public and static modifier, can it have other modifiers?

Last Answer : No

Description : What doe the stackalloc operator do?

Last Answer : Allocate a block of memory on the stack (used in unsafe mode).  

Description : What is the difference between the new operator and modifier?

Last Answer : The new operator creates an instance of a class whereas the new modifier is used to declare a method with the same name as a method in one of the parent classes.

Description : What are the four major parts of a SQL SELECT statement? Briefly describe each one.

Last Answer : The four major parts of a SELECT statement are SELECT, FROM, WHERE, and ORDER BY. SELECT specifies the fields to be retrieved. FROM specifies the table from which the records are to be retrieved. WHERE ... the records to be retrieved, and ORDER BY allows you to specify a sort order for the records.

Description : What are the two kinds of multidimensional arrays? Briefly describe each.

Last Answer : Multidimensional arrays can be either rectangular arrays or jagged arrays. A rectangular array can be thought of as a table, where each row has the same number of columns. Rectangular arrays with ... dimensional jagged array is like a table where each row might have a different number of columns.

Description : Briefly describe the major components of the .NET Framework and describe what each component does.

Last Answer : The .NET Framework consists of two primary parts: the common language runtime, which manages application execution, enforces type safety, and manages memory reclamation, and the .NET base class library, which consists of thousands of predeveloped classes that can be used to build applications.

Description : Describe a general strategy for creating a setup project that terminates installation if a specific file is not already installed on the target machine.

Last Answer : First, create a file search to search the file system for the specific file. Then create a launch condition to evaluate the results of the search. You can connect the launch condition to ... in the search's Property property in the expression specified by the launch condition's Condition property. 

Description : Describe XCOPY deployment. Under what conditions is it useful? When can it not be used?

Last Answer : XCOPY deployment is a simple method of deployment where the DOS command XCOPY is used to copy the application directory and any subdirectories to the target machine. You can use XCOPY ... an application requires a more complex deployment or references shared assemblies, you cannot use XCOPY.

Description : Describe how to use code to retrieve resources at run time.

Last Answer : You must first create an instance of the ResourceManager class that is associated with the assembly that contains the desired resource. You can then use the GetString method to retrieve string resources or the GetObject method to retrieve object resources.

Description : Describe how to sign your assembly with a strong name. Why would you want to do this?

Last Answer : To sign your assembly with a strong name, you must have access to a key file or create one with the strong name utility (sn.exe). You then specify the key file in the AssemblyInfo file and ... identity, a strong name is required if you want to install your assembly to the Global Assembly Cache.

Description : Describe how to create localized versions of a form.

Last Answer : To create a localized version of a form, set the Localizable property to true. Then set the Language property to the language/region for which you want to create the localized form. Make ... be stored in resource files and loaded when the CurrentUICulture is set to the appropriate CultureInfo. 

Description : Briefly describe the five accessibility requirements of the Certified for Windows logo program.

Last Answer : The five requirements are o Support standard system settings. This requires your application to be able to conform to system settings for colors, fonts, and other UI elements. o Be ... information by sound alone. This requirement can be met by providing redundant means of conveying information.

Description : Briefly describe how to use the PrintDocument component to print a document. Discuss maintaining correct line spacing and multipage documents.

Last Answer : The PrintDocument class exposes the Print method, which raises the PrintPage event. Code to render printed items to the printer should be placed in the PrintPage event handler. The PrintPage event ... been printed, you must incorporate all logic for printing multiple pages into your event handler.

Description : Describe how to create a form or control with a nonrectangular shape.

Last Answer : Set the Region property of the form or control to a Region object that contains the irregular shape. You can create a Region object from a GraphicsPath object.

Description : Describe the role of the LicenseProvider in control licensing.

Last Answer : The LicenseProvider controls license validation and grants run-time licenses to validly licensed components. The LicenseManager.Validate method checks for an available license file and checks ... of LicenseProvider. You specify which LicenseProvider to use by applying the LicenseProviderAttribute. 

Description : Describe the general procedure for rendering text to a drawing surface.

Last Answer : You must first obtain a reference to a Graphics object. Next, create an instance of a GraphicsPath object. Use the GraphicsPath.AddString method to add text to the GraphicsPath. Then, call the Graphics.DrawPath or Graphics.FillPath to render the text.

Description : Describe the roles of Graphics, Brush, Pen, and GraphicsPath objects in graphics rendering.

Last Answer : The Graphics object represents a drawing surface and encapsulates methods that allow graphics to be rendered to that surface. A Brush is an object that is used to fill solid shapes, and a Pen ... lines. A GraphicsPath object represents a complex shape that can be rendered by a Graphics object.

Description : Briefly describe the three types of user-developed controls and how they differ.

Last Answer : The three types of user-developed controls are inherited controls, user controls, and custom controls. An inherited control derives from a standard Windows Forms control and inherits the ... inherit only generic control functionality. All specific functionality must be implemented by the developer.

Description : Briefly describe an XmlDataDocument and how it relates to a DataSet.

Last Answer : An XmlDataDocument is an in-memory representation of data in a hierarchical XML format. Each XmlDataDocument is synchronized with a DataSet. Whenever changes are made to one object, the other is instantly updated. Thus, you can use the XmlDataDocument to perform XML manipulations on a DataSet.

Description : Describe how to use a DataView to filter or sort data.

Last Answer : You can apply sort criteria to a DataView by setting the Sort property to the name of a column or columns to be sorted by. The data represented in a DataView object can be filtered by setting the RowFilter property to a valid filter expression.

Description : Describe Break mode and some of the available methods for navigating in Break mode.

Last Answer : Break mode allows you to observe program execution on a line-by-line basis. You can navigate program execution in Break mode by using Step Into, Step Over, Step Out, Run To Cursor, and Set Next Statement.

Description : Describe an abstract class and explain when one might be useful.

Last Answer : An abstract class is a class that cannot be instantiated but must be inherited. It can contain both implemented methods and abstract methods, which must be implemented in an inheriting class. ... common interface for other methods, and leave more detailed implementation up to the inheriting class.

Description : Describe in general terms how to add a control to a form at run time.

Last Answer : You must first declare and instantiate a new instance of the control. Then, you must add the control to the form�s Controls collection. Once the control has been added to the Controls collection, you must manually set properties that govern the control�s position and appearance.

Description : Describe how to retrieve the ASCII key code from a keystroke. How would you retrieve key combinations for non-ASCII keys?

Last Answer : Keystrokes can be intercepted by handling the KeyPress and KeyDown events. Both of these events relay information to their handling methods in the form of their EventArgs. The KeyPressEventArgs, ... you would handle the KeyDown event and use the properties exposed by the KeyEventArgs instance.

Description : Describe what is meant by field-level validation and form-level validation.

Last Answer : Field-level validation is the process of validating each individual field as it is entered into a form. Form-level validation describes the process of validating all of the data on a form before submitting the form.

Description : Describe two ways to set the tab order of controls on your form.

Last Answer : You can set the tab order in Visual Studio by choosing Tab Index from the View menu and clicking each control in the order you desire. Alternatively, you can set the TabIndex property either in code or in the Properties window.

Description : Briefly describe how a class is similar to a structure. How are they different?

Last Answer : Both classes and structures can have members such as methods, properties, and fields, both use a constructor for initialization, and both inherit from System.Object. Both classes and structures can be ... are value types, and the memory that holds structure instances is allocated on the stack. 

Description : Explain what constructors and destructors are and describe what they are used for.

Last Answer : The constructor is the method that initializes a class or structure and is run when a type is first instantiated. It is used to set default values and perform other tasks required by the class. ... reclaimed by garbage collection. It contains any code that is required for cleanup of the object. 

Description : Briefly describe what members are, and list the four types of members.

Last Answer : Members are the parts of a class or a structure that hold data or implement functionality. The primary member types are fields, properties, methods, and events.

Description : Briefly describe how garbage collection works.

Last Answer : The garbage collector is a thread that runs in the background of managed .NET applications. It constantly traces the reference tree and attempts to find objects that are no longer referenced. When a nonreferenced object is found, its memory is reclaimed for later use.

Description : Describe the accessibility modifier “protected internal”. 

Last Answer : It is available to classes that are within the same assembly and derived from the specified base class.

Description : Name and describe 5 different documentation tags.

Last Answer : /// <value></value> /// <example></example> /// <exception cref=""></exception> /// <include file='' path='[@name=""]'/> /// ... cref=""/> /// <seealso cref=""/> /// </summary>

Description : Describe garbage collection (in simple terms).

Last Answer : Garbage collection eliminates uneeded objects. 1. the new statement allocates memory for an object on the heap. 2. When no objects reference the object it may be removed from the heap (this is a non deterministic process). 3. Finalize is called just before the memory is released.

Description : Describe Jump statements: break, continue, and goto. 

Last Answer : Break terminates a loop or switch. Continue jumps to the next iteration of an enclosing iteration statement. Goto jumps to a labelled statement.

Description : Describe 5 numeric value types ranges. 

Last Answer : sbyte -128 to 127, byte 0 – 255, short -32,768 to 32,767, int -2,147,483,648 to 2,147,483,647, ulong 0 to 18,446,744,073,709,551,615 

Description : Describe the accessibility modifier “protected internal”. 

Last Answer : It is available to classes that are within the same assembly and derived from the specified base class.

Description : Describe the accessibility modifier protected internal. 

Last Answer : It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in). 

Description : What are the three possible settings for the CommandType property of a SqlCommand object or an OleDbCommand object, and what does each mean?

Last Answer : A Command object can have a CommandType property setting of Text, StoredProcedure, or TableDirect. When set to Text, the command executes the SQL string that is stored in the Command object's ... that the command should return the entire contents of the table indicated by the CommandText property. 

Description : What are the major components of a Data Provider, and what function does each fulfill?

Last Answer : An ADO.NET Data Provider is a suite of components designed to facilitate data access. Every Data Provider minimally includes a Connection object that provides the actual connection to the data ... only, read-only access to a database, and a DataAdapter that facilitates disconnected data access.

Description : Classify plastic materials into two categories, describe their important properties and give two examples of each.

Last Answer : Ans: Plastic materials can be classified into thermoplastic and thermosetting plastics. Thermoplastic materials:- The properties of these plastic materials do not change considerably if they are melted ... forming elastic threads and films. Examples are Phenol formaldehyde (Bakelite), Epoxy resins.

Description : State and describe use of pointer operator and address operator. Give one example of each. 

Last Answer : Pointer operator:- * It is used to declare a pointer variable. Also used as "value at" operator to read value stored inside the address pointed by pointer. Example: int *ptr; Address operator:-& ... address of a variable can be stored in pointer variable. Example: int a,*ptr; ptr=&a;

Description : What si the difference between interface and abstractclass Select Answer:  1. interface contain only methods  2. we can't declare a variable for interface  3. interface contain only events  4. None  5. All

Last Answer : Ans : 2 The only Difference between Interface and Abstract class is we can declare a variable in abstract class but we can't declare in variable interface

Description : What is the lifespan for items stored in ViewState? Select Answer:  1. Item stored in ViewState exist for the life of the current page  2. Item stored in ViewState exist for the life ... of the current Applicaiton  4. Item stored in ViewState exist for the life of the current configuration

Last Answer : 1. Item stored in ViewState exist for the life of the current page AS any web application works on request and response basis ,so on every post backs, The data in control gets lost. To retain page ... control with data. The life cycle of the view state exist for life of current running page only. 

Description : Which one of the following tools is used to view the metadata information contained in a .NET assembly? Select Answer:  1. al.exe  2. ilasm.exe  3. vbx.exe  4. csc.exe  5. ildasm.exe

Last Answer :  5. ildasm.exe

Description : How would you ensure that all relevant registry entries were removed in the event that installation of your application failed?

Last Answer : You can ensure that registry entries are removed, as well as perform any other “clean-up” tasks, by creating an Installer class and writing the appropriate code in the Rollback event handler. Then create a new Custom Action and set the InstallerClass, and EntryPoint properties to appropriate values.

Description : What is the purpose of a bootstrapper application? When do you not need to create one?

Last Answer : A bootstrapper application automatically detects if Windows Installer is installed on the target machine. If Windows Installer is not present, it installs Windows Installer before proceeding with the rest ... Installer 1.5 already installed) or have had Microsoft Installer 1.5 installed previously.