Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Conversion: trytes and trits
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at
// Complete description and story behind the snippet is available at:
// Requirement: Tangle.Net library (!nuget install Tangle.Net)
#r "Tangle.Net.dll"
using Tangle.Net.Entity;
var trytes = new TryteString("YZJEATEQ9JKLZ");
Console.WriteLine("Number of Trytes: " + trytes.TrytesLength);
var trits = trytes.ToTrits();
Console.WriteLine(String.Join(",", trits));
Console.WriteLine("Number of Trits: " + trits.Length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment