https://github.com/codeconscious/rubyish-csharp
What if some convenient Ruby methods were available in C#?
https://github.com/codeconscious/rubyish-csharp
csharp csharp-library ruby
Last synced: about 2 months ago
JSON representation
What if some convenient Ruby methods were available in C#?
- Host: GitHub
- URL: https://github.com/codeconscious/rubyish-csharp
- Owner: codeconscious
- Created: 2023-01-18T13:06:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T09:40:43.000Z (over 3 years ago)
- Last Synced: 2025-04-11T01:14:37.957Z (about 1 year ago)
- Topics: csharp, csharp-library, ruby
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rubyish C#
After getting some experience working with Ruby, I wondered what it would be like if some of the most convenient Ruby methods were available in C# too? So, I made some. This has surely been done before, but not by me. :-p
This is a C# 11 (.NET 7) library. I just started working on it recently, and it's still under basic development, but feel free to use it if you wish. I welcome any feedback, PRs, or discussion.
Examples:
```
10.Times(() => Console.WriteLine();
10.Times(i => Console.WriteLine(i);
Enumerable.Range(1, 100).Reject(i => i < 50); // The opposite of .Where
Enumerable.Range(1, 100).IsEmpty(); // false
```
-----
この頃、Rubyを初めて使っていて、ふと思いました。「もしRubyのもっとも便利なメソッドがC#にも存在していたら」と。そういうちょっとしたわけで、開発して作ってみました。きっと他のどなたかが以前にやったことだろうとは思いますが、今回は僕が挑戦してみたかったのです。
最近の.NET 7のC# 11のライブラリーです。最近始めたばかりで、時間がある時にだけ軽く開発している程度ですが、もし興味があれば使ってみてください。意見もPRもディスカッションもウェルカムです。