BitSharper.Block.ToString C# (CSharp) Method

ToString() public method

Returns a multi-line string containing a description of the contents of the block. Use for debugging purposes only.
public ToString ( ) : string
return string
        public override string ToString()
        {
            var s = new StringBuilder();
            s.AppendFormat("v{0} block:", _version).AppendLine();
            s.AppendFormat("   previous block: {0}", _prevBlockHash).AppendLine();
            s.AppendFormat("   merkle root: {0}", MerkleRoot).AppendLine();
            s.AppendFormat("   time: [{0}] {1}", _time, new DateTime(_time*1000)).AppendLine();
            s.AppendFormat("   difficulty target (nBits): {0}", _difficultyTarget).AppendLine();
            s.AppendFormat("   nonce: {0}", _nonce).AppendLine();
            if (Transactions != null && Transactions.Count > 0)
            {
                s.AppendFormat("   with {0} transaction(s):", Transactions.Count).AppendLine();
                foreach (var tx in Transactions)
                {
                    s.Append(tx.ToString());
                }
            }
            return s.ToString();
        }