GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 54 of 431    Print  

Does C# support parameterized properties?

No. C# does, however, support the concept of an indexer from language spec.

An indexer is a member that enables an object to be indexed in the same way as an array. Whereas properties enable field-like access, indexers enable array-like access.

As an example, consider the Stack class presented earlier. The designer of this class may want to expose array-like access so that it is possible to inspect or alter the items on the stack without performing unnecessary Push and Pop operations. That is, Stack is implemented as a linked list, but it also provides the convenience of array access.

Indexer declarations are similar to property declarations, with the main differences being that indexers are nameless (the name used in the declaration is this, since this is being indexed) and that indexers include indexing parameters. The indexing parameters are provided between square brackets.




  
Total Answers and Comments: 1 Last Update: January 06, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 06, 2006 09:24:34   #1  
sahu Member Since: December 2005   Contribution: 324    

RE: Does C# ...

Ans:

No


 
Is this answer useful? Yes | No

 Related Questions

All methods marked with the DllImport attribute must be marked as public static extern.  
Latest Answer : It works perfectly.  You can find the dialogue window by using "ALT+Tab" keyRobert  ...

C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x){case 0:// do somethingcase 1:// do something in common with 0default:// 
Latest Answer : c# switch allows fall through if and only if in empty case. as long as there is a statement in the case it must  use break or go to to  jump out of the case. ...

The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case 
Latest Answer : Constant : The constants are the one whose value remain same at all the time.it will be used if u want to define something at compile time.Read only....if you don't know value at compile time but u can find that at runtime that time u can use ...

Use a conditional attribute on the method, as shown below: class Debug{[conditional("TRACE")]public void Trace(string s){Console.WriteLine(s);}}class MyClass{public static void Main(){Debug.Trace("hello");}}In 
Latest Answer : if you are using conditinoal attribute then add the name spaceSystem.Diagnostics.ConditionalAttribute ...

You need to use the /target:library compiler option.  
Latest Answer : Open the property page of the Project File and thenopen CommonProperties -> Genaral ->Output Typechange the output type to class library and build the application then u'll get a dll file.also in the Configuartion Properties ->Build -> Output ...

The word checked is a keyword in C#.  
Latest Answer : Reason is checked is a keyword in C#,but if u want to keyword as an identifier use @ with it.e.g int @checked=3;This works with all the keywords,but it is recommended to avoid it. ...

What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
The syntax for calling another constructor is as follows: class B{B(int i){ }}class C : B{C() : base(5) // call base constructor B(5){ }C(int i) : this() // call C(){ }public static void Main() {}}  

C# has the is operator: expr is type  
Latest Answer : EX:==============using System; class ClassA {} public class TestIs{   public static void Test (object o)    {      ClassA a = null;       if (o is ClassA)       ...

If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following 
Latest Answer : If your method does not have any return type then mention void before that method or return 0 ...

Strings are not null terminated in the runtime, so embedded nulls are allowed. Console.WriteLine() and all similar methods continue until the end of the string.  
Latest Answer : Console.WriteLine() stop printing when it reaches a 'Carriage Return' (denotes next line) character within a string! ...


 Sponsored Links

 
Related Articles

ERP Systems as Quality Control Support

ERP Systems as Quality Control Support For the past few years ERP systems have became one of the most powerful tools for quality control management But ERP is just an informatics system that provides support to the integrated business management mosgoogle center Goals of the Quality Control Module i
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

JavaScript Windows Object Properties Part II

JavaScript Windows Object Properties Part II In this JavaScript tutorial you will learn about screenX screenY screenLeft and screenTop top length frames opener parent and window property of Window object along with syntax and examples mosgoogle center screenX This property screenX returns the x coor
 

JavaScript Windows Object Properties Part I

JavaScript Windows Object Properties Part I In this JavaScript tutorial you will learn about Windows Object properties namely personalbar statusbar scrollbar toolbar property of Window object pageXOffset pageYOffset innerwidth innerheight outerwidth and outerheight mosgoogle center personalbar Prope
 

JavaScript History Object Properties and Methods

JavaScript History Object  Properties and Methods In this JavaScript tutorial you will learn about history object properties and methods length current next previous properties back forward and go methods along with syntax and examples mosgoogle center The history property has the return v
 

JavaScript Location Object Properties

JavaScript Location Object Properties In this JavaScript Tutorial you will learn about Properties of Location Object hash host hostname pathname port protocol and search property mosgoogle center The Location object contains information about the current URL This representation is a string that den
 

JavaScript Document Object Properties

JavaScript Document Object Properties In this JavaScript tutorial you will learn about Document Object Properties viz formName forms images lastModified layers linkColor links plugins referrer title URL and vlinkColor mosgoogle center formName Using the formName property any form in the document can
 

JavaScript Event Object Properties and Methods

JavaScript Event Object Properties and Methods In this JavaScript tutorial you will learn about event object properties and methods like keycode layer offset modifiers page reason returnValue screen srcElement target srcFilter and type mosgoogle center keycode The keycode property of event object is
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape