Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slavikdev/rush
Productive Ruby Features in C# .NET
https://github.com/slavikdev/rush
csharp dotnet library net nuget package ruby rush
Last synced: 8 days ago
JSON representation
Productive Ruby Features in C# .NET
- Host: GitHub
- URL: https://github.com/slavikdev/rush
- Owner: slavikdev
- License: mit
- Created: 2017-03-04T11:10:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T01:03:46.000Z (about 7 years ago)
- Last Synced: 2024-12-01T13:17:57.795Z (2 months ago)
- Topics: csharp, dotnet, library, net, nuget, package, ruby, rush
- Language: C#
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rush: Productive Ruby Features in C# .NET
Increase productivity by useful Ruby language features available in C# .NET.[![Build status](https://ci.appveyor.com/api/projects/status/x8ihl9lq21fc838n?svg=true)](https://ci.appveyor.com/project/slavikdev/rush)
## Iterators
### Times iteratorRuby:
```ruby
5.times { puts "Hello" }
10.times { |i| puts "Hello #{i}" }
```C#:
```csharp
5.Times( () => Console.WriteLine( "Hello" ) );
10.Times( i => Console.WriteLine( "Hello, {0}", i ) );
```### Each iterator
Ruby:
```ruby
"hello".each { |ch| print ch }
"message".each_with_index { |ch,i| puts "#{i} is #{ch}" }
```C#:
```csharp
"hello".Each( ch => Console.Write( ch ) );
"message".Each( (ch, i) => Console.WriteLine( "{0} is {1}", i, ch ) );
```