Last active
September 24, 2019 10:30
-
-
Save Hribek25/6e10c9836815a4b00a1c3a0bc5e5125a to your computer and use it in GitHub Desktop.
Conversion: trytes and trits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#3BB8C879CCAE | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
#r "Tangle.Net.dll" | |
using Tangle.Net.Entity; | |
var trytes = new TryteString("YZJEATEQ9JKLZ"); | |
Console.WriteLine(trytes.ToString()); | |
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