CSharp examples for System:String Encode Decode
Decode Bool from string
using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w w w. j av a 2 s . c o m*/ public class Main{ public static bool DecodeBool(string v) { try { int i = Convert.ToInt32(Convert.ToChar(v.Substring(0, 1))); return (i == 1); } catch (Exception e) { Console.WriteLine(e); return false; } } }