-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathArrayUtil.cs
More file actions
31 lines (29 loc) · 760 Bytes
/
Copy pathArrayUtil.cs
File metadata and controls
31 lines (29 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GitPowerShell.Util
{
public static class ArrayUtil
{
public static T[] Combine<T>(T[] one, T[] two)
{
if (one != null && two != null)
{
T[] all = new T[one.Length + two.Length];
Array.Copy(one, 0, all, 0, one.Length);
Array.Copy(two, 0, all, one.Length, two.Length);
return all;
}
else if (one != null)
{
return one;
}
else if (two != null)
{
return two;
}
return null;
}
}
}