Click here to Skip to main content
14,770,038 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I have struck with one problem.Is it possible to convert a set of string values into two dimensional char array. I have a 2D char array like as follows,

public char[,] in_names;

in_names = new char[10,20];

Now i want to put some set of string values into this array.But i am struggling to find the syntax (how to convert). Any one pls guide on this.

Shiva..
Posted
Updated 17-Mar-18 3:12am

Hi Shiva
you could do the following
1-declar anther char array
2-Copy your string to that char array
3- Copy the result char array to ur target char
4- more likley u need this
YourString.CopyTo(0, UrSecondChararray, 0, len);
i hope this solve ur problem
khalid sabtan
saudia arabia
   
You have to write your own function to do this, and use looping to solve this issue.
   

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