Provide an abstraction layer to C# to simplify some stuffs.
Open Powershell or a terminal and enter this command:
dotnet add package ClintSharp
var name = "";
Console.WriteLine(name.IsNull()); // true
var date = DateTime.Now;
Console.WriteLine(date.ToTimestamp()); // 1558800650
The Json methods use Newtonsoft.Json.
var user = new List<User>() {};
...
Console.WriteLine(date.ToJson());
// Result: [{"username":"Clint","age":30},{"username":"John","age":19},{"username":"Jack","age":25}]
var user = new List<User>() {};
...
Console.WriteLine(date.ToJsonF());
Result:
[
{
"username": "Clint",
"age": 30
},
{
"username": "John",
"age": 19
},
{
"username": "Jack",
"age": 25
}
]