Click here to Skip to main content
15,889,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to use split method for below code
here i am fetching values through this custom config item "ManagerAccountsStatus" i want pass this in split()

this "ManagerAccountsStatus" contains 4 values(array values) with comma sapareted
C#
if (manager.managerkey.Split() )
 {
     if (!AccountManager.SetAAccountManagerstatus(session, _Manager, _account))
     {
       throw new XYException();
     }
 }



can any one help me on this?
Posted
Updated 6-Jan-15 19:23pm
v2
Comments
BillWoodruff 7-Jan-15 22:41pm    
You are asking a question about using String.Split() ... correct ?

Are you aware you can have an array of string in a Configuration file ?

1 solution

Use the following :
C#
string[] results = manager.managerkey.Split(','); // will give you an array of 4 string broken by a comma
 
Share this answer
 
Comments
devchina 7-Jan-15 1:22am    
how will i fetch this "ManagerAccountsStatus" item values inn split
Mehdi Gholam 7-Jan-15 1:24am    
result[0]
result[1]
result[2]
result[3]
Maddy selva 7-Jan-15 1:22am    
my 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900