Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 21:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Small Help In C#

Discussion on Small Help In C# within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
Small Help In C#

i have sting like this 5000/10000

so i want the program to read the 5000 and store it into variable and when see the / exclude it and read the 10000 and store it to variable 2

how could i do that
badguy4you is offline  
Old 07/07/2012, 04:11   #2
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Split at / ;o
MoepMeep is offline  
Old 07/07/2012, 04:15   #3
 
badguy4you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
lol the real prob is that i want to save result 1 in a variable alone and result 2 in other variable

when i try to do that i get the variables with only result 2 ( i think cuz of foreach word in words)
badguy4you is offline  
Old 07/07/2012, 12:24   #4
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Code:
String[] ret = string.Split('/');
int result1 = ConvertToInt(ret[0]);
int result2 = ConvertToInt(ret[2]);
Must be magic!
MoepMeep is offline  
Old 07/07/2012, 14:00   #5


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Arrow General Coding -> .NET Languages

#moved

Quote:
String[] ret = string.Split('/');
int result1 = ConvertToInt(ret[0]);
int result2 = ConvertToInt(ret[2]);
The index for result2 should be 1 and not 2.
MrSm!th is offline  
Thanks
1 User
Old 07/07/2012, 18:53   #6
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by MrSm!th View Post
#moved

The index for result2 should be 1 and not 2.
u dont say?

So langsam solltest du wissen, dass es bei mir kein spoonfeeding gibt.
MoepMeep is offline  
Reply


Similar Threads Similar Threads
[Small-Release] Mob regen helper (small)
06/15/2012 - Metin2 PServer Guides & Strategies - 8 Replies
Huhu, ich fülle gerade einige maps mit Monster voll und da der Map Pointer da nichts funktioniert von Musicinstrutor.. Hab ich eben schnell ne Funktion geschrieben. function mob_add_temp_regendata() -- local filename = 'wuste' local mob_vnums = number(2340,2346) -- local rr = number(1,2)
I need small help
04/08/2012 - Shaiya - 2 Replies
Well How can i change drop from fortune bag
Small things for small rewards.
10/10/2011 - CO2 Private Server - 1 Replies
Hey, Coding small things for small rewards. I try to fix up people 5375 sources as I know the entire source inside out(I did work with the base for over 4 months).. A few bugs knows are the: Peace PKMode, PKA, Useless NPCs,
Need a Small Help
02/01/2010 - Kal Online - 2 Replies
hello everybody I have problem that when i play in Pservers which have GBL some time the pc restart and i need blue page and there is a latters and numbers is that from GBL servers or no ,, and this from what ! if anyone know can tell me please thanks all I didn't saw that blue page before only when i used PBDownForce to unblock your self from GBL And i see this blue page when i press on Control Panel in FusionKal V2 site .. always the pc freeze and it restart and see that page...



All times are GMT +1. The time now is 21:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.