.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

What are the Important points to remember on indexers

Posted By :Karthikeyan Anbarasan     Posted Date :May 30, 2011    Points :40   Category :.NET Framework 
Indexers are always created with this keyword.

· Parameterized property are called indexer.

· Indexers are implemented through get and set accessors for the [ ] operator.

· ref and out parameter modifiers are not permitted in indexer.

· Indexer is an instance member so can't be static but property can be static.

· Indexers are used on group of elements.

· Indexer can be overloaded.


You can also find related Interview Question to What are the Important points to remember on indexers  below: 

What is cyclomatic complexity and why is it important?

  
Cyclomatic complexity is a computer science metric (measurement) developed by Thomas McCabe used to generally measure the complexity of a program. It directly measures the number of linearly independent paths through a programs source code.
The concept, although not the method, is somewhat similar to that of general text complexity measured by the Flesch-Kincaid Readability Test.
Cyclomatic complexity is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge connects two nodes, if the second command might be executed immediately after the first
command. By definition,
CC = E - N + P
where
CC = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components (More...)

Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?

  
Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.
(More...)

What points to be kept in mind while using conditional operator i.e. AND, NOT & OR operator?

  
AND operator: does not hurt the performance of the database engine the reason is that it in fact reduces the result from the result set.

OR operator : When Index is used with the OR operator then all the column used/referenced by the OR operator in the where clause must include in an index or none of the indexes are used.

NOT operator: It hurts the performance of the database engine the reason is that the query optimizer which optimizes the query is not able to use index for the where clause when ever a NOT operator is used/specified in the where clause of the query (More...)

what is the important change in web.config when we can use Allow server Side Code in Pages?

  
For Allow server side scipt / Inline code in server pages, add this below tag In web.config.









(More...)

What are Indexers

  
Indexers permit instances of a class or struct to be indexed in the same way as arrays.

· Indexers are similar to properties except that their accessors take parameters.

· The indexers are usually known as smart arrays in C#.

· An indexer, also called an indexed property, is a class property that allows you to access a member variable of a class using the features of an array.

· Defining an indexer allows you to create classes that act like virtual arrays. Instances of that class can be accessed using the [] array access operator.


(More...)

Difference between Indexers and Properties

  
Indexers are created with this keyword
Properties don't require this keyword

Indexers are identified by signature
Properties are identified by their names

Indexers are accessed using indexes
Properties are accessed by their names

Indexer are instance member, so can't be static
Properties can be static as well as instance members

(More...)

What are Indexers

  
Indexers permit instances of a class or struct to be indexed in the same way as arrays.

· Indexers are similar to properties except that their accessors take parameters.

· The indexers are usually known as smart arrays in C#.

· An indexer, also called an indexed property, is a class property that allows you to access a member variable of a class using the features of an array.

· Defining an indexer allows you to create classes that act like virtual arrays. Instances of that class can be accessed using the [] array access operator.


(More...)

What are some considerations to remember when you use views?

  
Objects that are referenced in a view are verified when a view is created. Views can be altered so that permissions that are assigned to the view are maintained. Dropping or altering an underlying table affects the view. If the view is not created by a sysadmin, the user name should be specified as part of the view name. The same owner should own all objects upon which a view depends in order to avoid broken ownership chains. Hidden complexity can make it difficult to determine the source of performance problems.
(More...)

Could remember some of the new features included in C#3.0 Version?

  
C# 3.0 has following good features and these features works with Visual studio 2008.

Object and Collection Initializers
Implicitly Typed Local Variables
Implicitly Typed Arrays
Extension Methods
Lambda Expressions
Anonymous Types
Query Expressions(LINQ)
Automatically Implemented Properties


(More...)

Why are application pools important?

  
They provide a way for multiple sites to run on the same server but still have their own worker processes and identity. (More...)

Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?

  
Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.
(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend