Jobs keyword-wise

VB.Net - What is Anonymous type? Its features

Next>>         Learn VB.NET
VB.NET - What is Anonymous type? Its features - April 29, 2009 at 18:00 PM by Amit Satpute

What is Anonymous type in VB.NET? Explain its features.

Anonymous type in VB.NET allows data types to be created from the code that requires it.

They should be stored in variables declared with the keyword VAR.

Dynamic typing is different from Anonymous type.

VB.NET - What is Anonymous type? Its features - June 07, 2009 at 10:00 PM by Shuchi Gauri

What is Anonymous type in VB.NET? Explain its features.

An anonymous type is a class that contains one or more named values. Provides a quick and easy way to define simple classes for holding multiple values. Supports both mutable and immutable anonymous types.

e.g.:

Dim myClass = New With {.Name= "john", .age = 59}

Compiler generates a type definition for the myClass, giving it a Name property as String and a Age property as int. This helps in late binding as well.


Next>>

Also read

What is different between Web.Config and Machine.Config?

NET Constructors and destructors

NET Control

NET Dataset objects



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring