Skip to content

Instantly share code, notes, and snippets.

@kddlb
Created Aug 21, 2017
Embed
What would you like to do?
test
// Decompiled with JetBrains decompiler
// Type: SillyDate.Program
// Assembly: SillyDate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 7D76919F-64D5-414B-8485-4C75047D30F9
// Assembly location: C:\Users\kevin\source\repos\SillyDate\SillyDate\bin\Debug\SillyDate.exe
using System;
using System.Collections.Generic;
using System.Text;
namespace SillyDate
{
internal class Program
{
private static void Main(string[] args)
{
Dictionary<string, int> dictionary = new Dictionary<string, int>()
{
{
"year",
DateTime.Now.Year
},
{
"month",
DateTime.Now.Month
},
{
"day",
DateTime.Now.Day
}
};
string s = string.Format("{{\"year\":{0},\"month\":{1},\"year\":{2}}}", (object) dictionary["year"], (object) dictionary["month"], (object) dictionary["day"]);
Console.WriteLine(s);
Console.WriteLine(string.Format("{{\"dateData\": \"{0}\"}}", (object) Convert.ToBase64String(Encoding.UTF8.GetBytes(s))));
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment