scriptonia

Mar 9 '11

Small snippet for C# for getting PublicKey of assembly

using(var writer = new StreamWriter(new FileStream("data.txt", FileMode.CreateNew, FileAccess.Write)))
{
    foreach (var b in Assembly.GetAssembly(typeof(Program)).GetName().GetPublicKey())
    {
        writer.Write(String.Format("{0:x2}", b));
    }
}

5 notes View comments Tags: .net csh programming

  1. oivoodoo posted this
Blog comments powered by Disqus