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

Top 5 Contributors of the Month
Melody Anderson

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

ReDim in VB.Net

Posted By:Narayanan       Posted Date: May 15, 2013    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

Today , we will discuss about how to Use REDIM Keyword in VB.net

   It is used for array.
   It is used to Change the Size of the One or More dimention of Array that has been already declared.
   It is free up or add elements to an array where you required.
   Dim month_Name(4) As String
        month_Name(0) = "Jan"
        month_Name(1) = "Feb"
        month_Name(2) = "Mar"
        month_Name(3) = "Apr"
        ReDim Preserve month_Name(11)
        month_Name(4) = "May"
        month_Name(5) = "Jun"
        month_Name(6) = "Jul"
        month_Name(7) = "Aug"
        month_Name(8) = "Sep"
        month_Name(9) = "Oct"
        month_Name(10) = "Nov"
        month_Name(11) = "Dec"
        Dim result As String = String.Empty
        For Each result In month_Name

Happy Coding!


Further Readings:


    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply
    Find More code samples in C#, ASP.Net, Vb.Net and more Here

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