https://github.com/rx-j/ignite.extensions
A simple class with the goal to make code more readable and clean.
https://github.com/rx-j/ignite.extensions
clean-code csharp-library
Last synced: 3 months ago
JSON representation
A simple class with the goal to make code more readable and clean.
- Host: GitHub
- URL: https://github.com/rx-j/ignite.extensions
- Owner: RX-J
- Created: 2024-07-29T11:18:19.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T23:12:08.000Z (10 months ago)
- Last Synced: 2025-03-13T12:14:48.864Z (3 months ago)
- Topics: clean-code, csharp-library
- Language: C#
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Ignite.Extensions contains some helpful functions with the goal to make code more readable and clean.
**To use the ```Pipe``` function, you can write:**
```cs
using System;
using Ignite.Extensions;Console.Write ("Enter a number: ");
Console.ReadLine ()
.Pipe (int.Parse) // the input from the Console.ReadLine() function will get passed down to the int.Parse function
.Pipe (i => i + 10) // from there we create the function, which adds 10 to the value of the parsed value from before
.Pipe (Console.WriteLine); // finally we take that value and send it to the Console.WriteLine function, which will print the final value// this is a good alternative for instead of having to write:
Console.Write ("Enter a number: ");
Console.WriteLine (int.Parse (Console.ReadLine ()) + 10);
```