Register or Login to Your Account
char[] buffer = new char[10];
char
[] buffer =
new
[10];
buffer[0] = '1';
buffer[0] = '1'
;
Console.Write(new String(buffer));
Console.Write(
String(buffer));
Output of below above code is "1\0\0\0\0\0\0\0\0\0"
You can do something like this - Example : string[] x = new string[] { "1", "", "2", "", "3", "4" }; List y = x.ToList(); y.RemoveAll(p => string.IsNullOrEmpty(p)); x = y.ToArray()
PARTH
You can do something like this -
Example :
string[] x = new string[] { "1", "", "2", "", "3", "4" };
List y = x.ToList();
y.RemoveAll(p => string.IsNullOrEmpty(p));
x = y.ToArray()