C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

Handling Strings


Posted Date: 31 Oct 2008    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: RoshanMember Level: Silver    
Rating: 1 out of 5Points: 10



Strings are supported by the .NET String class in Visual Basic.
We declare a String this way,

Dim strText as String

We can also initialize a string like this,
Dim myString As String="Welcome to Visual Basic"

A String can contain upto 2 billion Unicode characters.
Besides the String handling functions built in VB.NET,.NET framework functions are built into the String class that VB.NET uses.

For Eg:
The Visual Basic UCase function will convert strings to upper case and so will the String class's ToUpper method.

Option Strict On

Module Module1
Sub Main()
Dim strText1 As String="Welcome"
Dim strText2 As String
Dim strText3 As String

strText2=UCase(strText1)
strText3=strText1.ToUpper

System.Console.WriteLine(strText2)
System.Console.WriteLine(strText3
End Sub
End Module




Responses


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

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Strings  .  

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: VB.NET Code to get the month name by passing the month value as integer from 1 to 12
Previous Resource: Converting strings to numbers in VB.NET
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use