1 |
william |
527 |
using System; |
2 |
|
|
using System.Collections.Generic; |
3 |
|
|
using System.Linq; |
4 |
|
|
using System.Text; |
5 |
|
|
|
6 |
|
|
namespace RomCheater.Core |
7 |
|
|
{ |
8 |
|
|
public static class GuidTools |
9 |
|
|
{ |
10 |
|
|
public static Guid IncrementGuid(Guid guid) |
11 |
|
|
{ |
12 |
|
|
byte[] guidBytes = guid.ToByteArray(); |
13 |
|
|
guidBytes[guidBytes.Length - 1]++; // increment the search guid by 1 |
14 |
|
|
Guid t_guid = new Guid(guidBytes); |
15 |
|
|
return t_guid; |
16 |
|
|
} |
17 |
|
|
public static Guid DecrementGuid(Guid guid) |
18 |
|
|
{ |
19 |
|
|
byte[] guidBytes = guid.ToByteArray(); |
20 |
|
|
guidBytes[guidBytes.Length - 1]--; // increment the search guid by 1 |
21 |
|
|
Guid t_guid = new Guid(guidBytes); |
22 |
|
|
return t_guid; |
23 |
|
|
} |
24 |
|
|
} |
25 |
|
|
} |