Logo F2FInterview

.NET Framework Interview Questions

Q   |   QA

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.

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.

Advantage of using Connection Pooling is an improvement of performance and scalability

Disadvantage is that one or more database connections, even if they are currently not used, are kept open 

Connection Pooling is controlled and the parameters passed to a connection string comprises the following:

  • Connect Timeout
  • Min Pool Size
  • Max Pool Size
  • Pooling

A Connection Pool is maintained internally by the Connection Pool Manager. When a request for a subsequent connection comes in, the Connection Pool Manager searches the pool for the availability of a free connection and returns it to the application if one is available. Connection Pools works as below

  • If any unused connection is available, it returns one.
  • If all connections are used up, a new connection is created and added to the pool.
  • If the number of connections reaches the maximum number of connections in the pool, the requests are queued until a connection becomes free for reuse.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: