Horje
JavaScriptSerializer() and convert to base64 Code Example
JavaScriptSerializer() and convert to base64
class Program
{
    static void Main(string[] args)
    {
        var account = new ExternalAccount() { Name = "Someone" };
        string json = JsonConvert.SerializeObject(account);
        string base64EncodedExternalAccount = Convert.ToBase64String(Encoding.UTF8.GetBytes(json));
        byte[] byteArray = Convert.FromBase64String(base64EncodedExternalAccount);

        string jsonBack = Encoding.UTF8.GetString(byteArray);
        var accountBack = JsonConvert.DeserializeObject<ExternalAccount>(jsonBack);
        Console.WriteLine(accountBack.Name);
        Console.ReadLine();
    }
}

[Serializable]
public class ExternalAccount
{
    public string Name { get; set; }
}




Csharp

Related
c# if break Code Example c# if break Code Example
copy-the-entire-contents-of-a-directory-in-c-sharp Code Example copy-the-entire-contents-of-a-directory-in-c-sharp Code Example
change object material unity Code Example change object material unity Code Example
create dropdown in datatable c# dynamically Code Example create dropdown in datatable c# dynamically Code Example
math.pow in C# using loop Code Example math.pow in C# using loop Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9