95
1
using System; using System.Diagnostics; using System.Linq;
2
public static class Program
3
{
4
//Considered Buffer.BlockCopy implementation for string[]
5
//but conversion to bytes is one interation already all values
6
//byte[] bytes = array.Select(s => Convert.ToByte(s, 16)).ToArray(); first then use blockcopy
7
8
public static void PushStringCopyArray(ref string[] array, string pushvalue)
9
{
10
string[] temp = new string[array.Length];
11
temp[0] = pushvalue;
12
13
Array.Copy(array, 0, temp, 1, array.Length-1);
14
15
array = temp;
16
}
17
18
public static void PushStringArray(ref string[] array, string pushvalue)
19
{
20
21
string[] temp = new string[array.Length];
22
23
temp[0] = pushvalue; //push new value on top of array
24
Cached Result