Skip to content

LiptonDev/System.Extended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System.Extended

Linq

Methods: JoinString, Shuffle, IsEmptyOrNull, IsEmpty, Pipe, ToEnumerable, ForEach

Byte

Methods: ConvertToBase64, ToString, GetHash

String

Methods: IsEmpty, IsMatch, ToBytes, GetHash, GetStringHash, FromBase64, FromBase64String

ExConsole

int readInt = ExConsole.ReadLine<int>("Enter int value: ");
var readInt = ExConsole.ReadLine<int>(x => int.TryParse(x, out _), x => Convert.ToInt32(x), "Enter int value: ");

IniManager

IniManager ini = new IniManager(@"C:\main.ini");
var port = ini.Read("Connection", "Port");
ini.Write("Connection", "Port", "1900");

Object replacing

class Aggregate
{
    public int Id { get; set; }
    public string Name { get; set; }
}

class First
{
    public int Id { get; set; }
}

class Second
{
    public string Name { get; set; }
}

Aggregate aggregate = new Aggregate();
First first = new First { Id = 500 };
Second second = new Second { Name = "Git" };

aggregate.ReplaceBy(first); //aggregate.Id = 500
aggregate.ReplaceBy(second); //aggregate.Name = "Git"
Aggregate newAggregate = new Aggregate();
newAggregate.ReplaceBy(aggregate); //Id = 500, Name = "Git"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages