C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Using Generics In Framework 2.0 using VB.net


Posted Date: 12 Sep 2008    Resource Type: Code Snippets    Category: VB.NET Syntax

Posted By: Initiotech       Member Level: Gold
Rating:     Points: 10



This is a new concepts in the .net Framework 2.0.

Example
This is The General Class Created

Class GenericType(Of T) ' Creating an general Type of Class
Private _anyvalue As T ' Creating variables that will be used
Public Property Value() As T ' creating properties for variables
Get
Return _anyvalue
End Get
Set(ByVal value As T)
_anyvalue = value
End Set
End Property
End Class


The useage is as Follows:

Class DummyUse
Shared Sub Main()
Dim name As New GenericType(Of String)
name.Value = "Hefin"
Console.WriteLine(name.Value)
End Sub
End Class


================================================================================
Regards Hefin Dsouza.

Attachments

  • Download Attachment (21002-12457-Generics.rar)



  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Genrics  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: All the SQL SERVER Instance on local network
    Previous Resource: Using Nullable Type In Framework 2.0 using VB.net
    Return to Discussion Resource Index
    Post New Resource
    Category: VB.NET Syntax


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers   BizTalk Adaptors    Web Design

    it support

    Contact Us    Privacy Policy    Terms Of Use