Skip to content

Provide an abstraction layer to C# to simplify some stuffs and extends some objects.

License

Notifications You must be signed in to change notification settings

imclint21/EaseSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About ClintSharp

Provide an abstraction layer to C# to simplify some stuffs.

Install ClintSharp

Open Powershell or a terminal and enter this command:

dotnet add package ClintSharp

String Functions:

var name = "";
Console.WriteLine(name.IsNull()); // true

DateTime Functions:

var date = DateTime.Now;
Console.WriteLine(date.ToTimestamp()); // 1558800650

Json Functions:

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
  }
]

Releases

No releases published

Packages

No packages published

Languages