lundi 2 mars 2015

String arrays with special chars -removal and adding again- in C#

Am facing an issue related to string arrays. i am reading app.config's multiple entries in my console appln and stored into these in a string array.After this am checking the existence of special chars in this string array.



string [] BUnamesfromappconfig= new string [] {"CBM-SW","CBM]1O", "GENERIC1PDM" }


if it contains special chars, am replacing it with string.empty.After removal of these special chars i am getting the new string variables.i put these in a for loop.Am not sure whether i can store these strings into any other object,if yes please advice. Assume, string [] BUNamesFinalArray = new string [oldstrarray.length]; Later, i want to loop through this newly formed array of strings and get these individual strings from this BUNamesFinalArray and set some values.


Aucun commentaire:

Enregistrer un commentaire