Bonjour et merci pour votre contribution

Je ne vois pas comment convertir cette fonction C# en C++ CLI, en particulier la ligne string result ... en sachant qu'en C++ CLI, la fonction ne peut retourner une String:
En fait, je ne comprends pas et je n 'ai rien trouvé sur le net concernant le String.Concat(buffer.Select(x => x.ToString("X2")).ToArray());
Si quelqu'un sait et a un peu de temps à me consacrer, merci d'avance.

static Random random = new Random();
//static Random ^ random = gcnew Random();

public static string GetRandomHexNumber(int digits)
{
byte[] buffer = new byte[digits / 2];
//array<unsigned char>^ buffer = gcnew array<unsigned char>(digits / 2);
random.NextBytes(buffer);
//random->NextBytes(buffer);
string result = String.Concat(buffer.Select(x => x.ToString("X2")).ToArray());
//?
if (digits % 2 == 0)
return result;
return result + random.Next(16).ToString("X");
}