An open API service indexing awesome lists of open source software.

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#?

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もディスカッションもウェルカムです。