Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Guid Combined
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.IO; using System.Threading; using System.Threading.Tasks; namespace Rextester { public static class SystemExtensions { public static byte[] Combine(this byte[] @this, params byte[][] arrays) { byte[] rv = new byte[arrays.Sum(a => a.Length) + @this.Length]; int offset = 0; Buffer.BlockCopy(@this, 0, rv, offset, @this.Length); offset += @this.Length; foreach (byte[] array in arrays) { Buffer.BlockCopy(array, 0, rv, offset, array.Length); offset += array.Length; } return rv; } } public class Program { public static void Main(string[] args) { Parallel.For(0, 50, i => { var guidM = Guid.NewGuid().ToString("N").Substring(0, 10); Console.WriteLine(guidM); }); Parallel.For(0, 50, i => { var guidM = Guid.NewGuid(); var guidCombined = Convert.ToBase64String(Guid.NewGuid().ToByteArray().Combine(guidM.ToByteArray())).Substring(0, 10); Console.WriteLine(guidCombined); }); } } }
run
|
edit
|
history
|
help
0
Kare Çizimi
fgtyhi8uy7htr4e3qwcedf
c# with mysql
Base
Student Management System
CheckingAccount
Lesson 1.2 Part I
Asignacion 692018
Validate Norwegian Mobile Numbers
Dokkan 2.0