What keyword would you use for scope name clashes?

1 Answer

Answer :

this

Related questions

Description : Write code to use threading and the lock keyword. 

Last Answer : using System; using System.Threading; namespace ConsoleApplication4 { class Class1 { [STAThread] static void Main(string[] args) { ThreadClass tc1 = new ThreadClass(1); ThreadClass tc2 = new ThreadClass( ... Console.WriteLine(threadNumber + " working"); Thread.Sleep(1000); } } } } }

Description : Define what is the use of the abstract keyword?

Last Answer : The modifier abstract is a keyword used with a class, to indicate that this class cannot itself have direct instances or objects, and it is intended to be only a ‘base’ class to other classes.

Description : Why use the keyword “const” in C#? Give an example.

Last Answer : “Const” keyword is used for making an entity constant. We can’t reassign the value to constant. Eg: const string _name = “Test”;

Description : What does the keyword “virtual” declare for a method or property? 

Last Answer : The method or property can be overridden. 

Description : What is the volatile keyword used for?

Last Answer : It indicates a field can be modified by an external entity (thread, OS, etc.). 

Description : Class methods to should be marked with what keyword?

Last Answer : static

Description : Methods must declare a return type, what is the keyword used when nothing is returned from the method?

Last Answer : void 

Description : What does the keyword “virtual” declare for a method or property? 

Last Answer : The method or property can be overridden.

Description : What does the keyword virtual mean in the method definition? 

Last Answer : The method can be over-ridden. 

Description : Why is the virtual keyword used in code?

Last Answer : The Virtual keyword is used in code to define methods and the properties that can be overridden in derived classes.

Description : Define what is the difference between string keyword and System. String class?

Last Answer : String keyword is an alias for System. String class. Therefore, the System. String and string keyword are the same, and you can use whichever naming convention you prefer. The String class provides many methods for safely creating, manipulating, and comparing strings.

Description : Explain the “static” keyword in C#?

Last Answer : “Static” keyword can be used for declaring a static member. If the class is made static then all the members of the class are also made static. If the variable is made static then it will have a single instance and the value change is updated in this instance.

Description : Keyword scope" is associate with which type of scope in Web analytics?  Session scope  Visitor scope  Page Scope  None of the above

Last Answer :  Page Scope

Description : Were there cold war era submarine clashes that were suppressed to public knowledge?

Last Answer : Probably.

Description : Did border clashes between German and Swiss troops occur during WW2?

Last Answer : Yes. There were apparently minor skirmishes along the border throughout the war although nothing particulary exciting (going on the fact that most histories of Switzerland during ww2 devote about as much space I just did to the topic).

Description : Why do you think there are clashes between parents and non-parents over parenting issues?

Last Answer : If you were Frank Lloyd Wright would you want somebody telling you how to design a home just because they’ve watched HGTV a couple of times?

Description : How did the British government respond to protests, clashes and attacks by the Indian against the Jallianwala Bagh incident ? -SST 10th

Last Answer : (i) The government responded with brutal repression. (ii) Seeking to humiliate and terrorise people, Satyagrahis were forced to rub their noses on the ground. (iii) They were forced to crawl on ... (salute) to all sahibs. People were flogged and villages (around Gujranwala in Punjab) were bombed.

Description : Why there were clashes between weavers and gomasthas ? -SST 10th

Last Answer : The new gomasthas were outsiders, with no long term social link with the village. So they acted arrogantly, marched into villages with the police and punished weavers for delay in supply. So. there were reports of dashes between weavers and gomasthas.

Description : Mention any three social causes of the clashes between Gomasthas and Villagers. -SST 10th

Last Answer : (i) Gomasthas were outsiders and had no long term social link with the village. (ii) They acted arrogantly. (iii) They marched into villages with sepoys and peons, and punished weavers for delays in supply -often beating and flogging them.

Description : How were there clashes between gomasthas and weavers later on? -SST 10th

Last Answer : . Earlier, supply merchants belonged to the same village and looked after the needs of weavers. . The new gomasthas' were outsiders, with no social links with villagers. . They acted ... In many places, weavers deserted villages and migrated to other places for setting up their own looms.

Description : Why were there frequent clashes between Gomasthas and weavers in the villages? -SST 10th

Last Answer : There were frequent clashes between Gomasthas and weavers in the villages because of the following reasons: (i) Earlier supply merchants often belonged to the same villages and had a close ... (Karnataka) and Bengal weavers deserted villages, migrated or revolted along with the village traders.

Description : What caused clashes between early European settlers and Native Americans?

Last Answer : What is the answer ?

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 : Explain how to use the PrintPreviewDialog control to display a preview of a printed document before it is printed.

Last Answer : You display a preview of a printed document with the PrintPreviewDialog control by first setting the PrintDocument property of the PrintPreviewDialog instance to the PrintDocument you want to preview, then by calling the PrintPreviewDialog.Show command to display the dialog box. 

Description : Explain how to use the HelpProvider component to provide help for UI elements.

Last Answer : You can provide either a HelpString or a help topic for UI elements with the HelpProvider. The HelpProvider provides HelpString, HelpKeyWord, and HelpNavigator properties for each control on the form. If ... particular element is displayed when the element has the focus and the F1 key is pressed.

Description : Explain how to use the Begin and End methods on a Web Service to make an asynchronous method call.

Last Answer : Every public Web method on a Web Service can be called either synchronously or asynchronously. To make an asynchronous call to a Web method, you call the method named Begin, where is the name of ... returned by Begin. This will allow you to retrieve the actual data returned by the Web method.

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 : In Visual Basic .NET or Visual C# programming, when would you use Structured Query Language (SQL)? How are they executed? 

Last Answer : ADO.NET handles most of the database communication for you behind-thescenes. You would only use SQL statements when generating ad-hoc queries for the database. You execute SQL statements by ... returning statements, such as DELETE, INSERT INTO, or UPDATE statements, use the ExecuteNonQuery method.

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 : When would you use the Watch window? 

Last Answer : You would use the Watch window to observe the values of application variables while in Break mode.

Description : Explain why you might use enums and constants instead of their associated literal values.

Last Answer : Enums and constants make code easier to read and maintain by substituting human-legible tokens for frequently used constant values.

Description : How do you enable your application to use .NET base class library members without referencing their fully qualified names?

Last Answer : Use the Imports keyword (Visual Basic .NET) or the using keyword (Visual C#) to make a .NET Framework namespace visible to your application. 

Description : Write code to define and use your own custom attribute.

Last Answer : (From MSDN) // cs_attributes_retr.cs using System; [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple=true)] public class Author : Attribute { public Author(string name) { this.name ... double version; string name; public string GetName() { return name; } }

Description : What namespace would you use for reflection?

Last Answer : System.Reflection 

Description : Can nested classes use any of the 5 types of accessibility?

Last Answer : Yes

Description : Write some code to declare and use properties.

Last Answer : // instance public string InstancePr { get { return a; } set { a = value; } } //read-only static public static int ClassPr { get { return b; } }

Description : Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with those values.

Last Answer : int x = 0, y = 0; int[] arr = new int [] {0,1,2}; foreach (int i in arr) { if (i%2 == 0) x++; else y++; }

Description : Events use a publisher/subscriber model. What is that?

Last Answer : Objects publish events to which other applications subscribe. When the publisher raises an event all subscribers to that event are notified.

Description : Write some code to use a delegate. 

Last Answer : Member function with a parameter using System; namespace Console1 { class Class1 { delegate void myDelegate(int parameter1); static void Main(string[] args) { MyClass myInstance = new ... void AMethod(int param1) { Console.WriteLine(param1); } } }

Description : Can you use access modifiers with destructors? 

Last Answer : No

Description : Define what is the main use of delegates in C#?

Last Answer : Delegates are mainly used to define call back methods.

Description : Define what is the use of the return statement?

Last Answer : The return statement is associated with procedures (methods or functions). On executing the return statement, the system passes the control from the called procedure to the calling procedure. This ... the currently executed code to return some value to the caller of the currently executed code.

Description : Define what is the use of a goto statement?

Last Answer : The goto statement is also included in the C# language. This goto can be used to jump from inside a loop to outside. But jumping from outside to inside a loop is not allowed.

Description : Can we use “this” inside a static method in C#?

Last Answer : No. We can’t use “this” in a static method.

Description : Why use “finally” block in C#?

Last Answer : Finally block will be executed irrespective of exception. So while executing the code in try block when an exception occurs, control is returned to catch block and at last finally block will be ... the closing connection to database / releasing the file handlers can be kept in finally block.

Description : Why use “using” in C#?

Last Answer : “Using” statement calls – “dispose of” method internally, whenever any exception occurred in any method call and in “Using” statement objects are read-only and cannot be reassignable or modifiable.

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.