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 !






String Manipulation - Part 4


Posted Date: 14 Aug 2008    Resource Type: Articles    Category: .NET Framework

Posted By: D.Jeya kumar(JK)       Member Level: Diamond
Rating:     Points: 10



CopyTo

Copy to function will copy a specified number of characters from a specified position from the string to a specified position in an array of characters.

Example

string strcopyto = "Text with in myself will be searched";
Char[] destination = { 'M', 'h', 'e','r','t' };

strcopyto.CopyTo(1, destination, 2, 3);
MessageBox.Show(destination[0].ToString() + destination[1].ToString() + destination[2].ToString() + destination[3].ToString() + destination[4].ToString() + destination[5].ToString());


Upper and Lower Case

To make a string as lower case or upper case we can use the ToLower and ToUpper functions

Example
string strcopyto = "Text with in myself will be searched";

strcopyto.ToUpper();
strcopyto.ToLower();

To find the Length of the string

To get the length of the string using Length function

Example

string strcopyto = "Text with in myself will be searched";

strcopyto.Length;

To Insert a string

To insert a String at the specified position using Insert function.

Example

It will insert “hai” at the index of 2

strcopyto.Insert(2, "hai");





Responses


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

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
String Manipulation  .  

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: String Manipulation - Part3
Previous Resource: Datetime Manipulation in Vb.net - Part 1
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use