What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 32828 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > substring in c# example without string functions. ...
Sekar.C

substring in c# example without string functions.

Replies: 2 | Posted by: Sekar.C on 5/8/2012 | Category: C# Forums | Views: 1247 | Status: [Member] | Points: 10  


Hi,
substring in c# example without string functions.

Regards
sekar.c

Regards
Sekar.c


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Prabhakar
Prabhakar  
Posted on: 5/8/2012 4:30:42 AM
Level: Starter | Status: [Member] [MVP] | Points: 25

Hello.. Sekar.C

Say ur Full Requirement . . if u want to Substring in a Textbox so use like this . .


txtemail.Text.Substring(0, 3);


Hope fully it's work for u . .

Best Regard's
Prabhakar

Sekar.C, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/8/2012 7:03:51 AM
Level: Silver | Status: [Member] | Points: 25

private void button1_Click(object sender, EventArgs e)

{
string str1 = "substring";
char substr;
int count = 0;
bool flag = true;
foreach (char c in str1)
count++;
for (int i=0,j=3;j<=count -1;i++, j++)
substr=str1[j]; //Here u can get 4th character to last character
MessageBox.Show ("Sub String=" & substr.toString);
}


Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 6:26:09 AM