Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2
You last visited: Today at 21:43

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

Advertisement



C# relationship between chars and strings

Discussion on C# relationship between chars and strings within the Conquer Online 2 forum part of the MMORPGs category.

Reply
 
Old   #1
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
C# relationship between chars and strings

I know that chars are wrappers around a string, but how would I declare an array able to change one of the characters in the string?
Lateralus is offline  
Old 05/04/2008, 11:48   #2
 
hok30's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 1,366
Received Thanks: 256
Did you already post this in the Or the section? Or do you just want somone from this section to handle it.
hok30 is offline  
Old 05/04/2008, 11:50   #3
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
I don't know if there is a easier way to do this but :

If you want to replace all specified chars in string :
Code:
string myString = "Hello World!";
            Console.WriteLine("This is what it's at the start : " + myString);
            myString = myString.Replace("l", "x");
            Console.WriteLine("nThis is what it's after the change : " + myString);
            //This is what it's at the start : Hello World
            //This is what it's after the change Hexxo Worxd
If you want to replace a specified character at specified place :

Code:
 string  myString = "Hello World!";

            char[] Array = myString.ToCharArray();
            Array[0] = 'X';
            myString = "";
            for (int i = 0; i < Array.Length; i++)
                myString += (char)Array[i];
            Console.WriteLine(myString);

            // Output : Xello World!
Hope it helps to right direction atleast. :P
tanelipe is offline  
Reply


Similar Threads Similar Threads
Richtig Strings tauchen?
09/08/2010 - S4 League - 16 Replies
Also wollte mal fragen ob es möglich ist zu wissen ob man Bestimmte Strings verwenden kann bei anderen, oder ob es glückssache ist. z.B. actor_default_hp_max="100.0" müsste man doch theoretisch mit allem austauschen können, was ein ="" hat oder? weil manchmal funktioniert es nicht z.B. kann man nicht power mit ray_maxdistance austauschen...
Strings während game
09/07/2010 - S4 League - 8 Replies
kann man strings auch während dem game austauschen?
Komisches Strings hacken
07/31/2010 - S4 League - 9 Replies
Also ich verstehe nicht, warum man, wenn man zB. actor_default_hp_max mit actor_default_animation_move_speed ersetzt, gleich die 915 HP hat, aber bei damage_multiplier ersetzt gegen ray_maxdistance nicht one-hittet sondern der DMG ganz verschwindet. Was ist der Unterschied??
To. elitepvpers relationship excellent programmer !?..
01/14/2010 - Dekaron Private Server - 5 Replies
i ask counsel if know solution method.:handsdown: register friend :-) my msn : [email protected]
ECSRO's Relationship with Elitepvpers
05/18/2008 - Silkroad Online - 10 Replies
im very confused i sometimes think this is official site for ECSRO but there is bots for it in here also they ban bots in game. then i see someone from ECSRO telling us about the opening of item mall i think hes a member from the ECSRO community very confused someone plz explain



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


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.