This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string ToUppercaseExpression(this string currentString) => | |
new string(currentString.Select(c => (char)(c < 97 || c > 122 ? c : c - 32)).ToArray()); | |
public static string ToUppercaseStatements(this string currentString) | |
{ | |
var returnValue = new StringBuilder(); | |
foreach(var c in currentString) | |
{ | |
if(c < 97 || c > 122) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.FSharp.Collections; | |
using System; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var numbers = FSharpList<int>.Cons( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let query1 = | |
query { | |
for customer in db.Customers do | |
select customer | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using Microsoft.FSharp.Core; | |
namespace FSharpLibrary | |
{ | |
// Token: 0x02000002 RID: 2 | |
[CompilationMapping(SourceConstructFlags.RecordType)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
namespace FSharpFromCSharp | |
{ | |
// Token: 0x02000006 RID: 6 | |
public class CsharpPoint : IEquatable<CsharpPoint> | |
{ | |
// Token: 0x06000006 RID: 6 RVA: 0x0000209B File Offset: 0x0000029B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Shape = | |
| Rectangle of width : float * length : float | |
| Circle of radius : float | |
| Prism of width : float * float * height : float |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
FSharpLibrary.Shape shape = FSharpLibrary.Shape.NewCircle(1); | |
Console.WriteLine($"Is this a rectangle: {shape.IsRectangle}"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reactive.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Example | |
{ | |
internal class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
One: Hi | |
Two: Hi | |
One: Hi | |
Two: Hi | |
One: Hi | |
Two: Hi | |
One: Hi | |
Two: Hi | |
One: Hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: One Message: Hi | |
Name: Two Message: Hi | |
Name: One Message: Hi | |
Name: Two Message: Hi | |
Name: One Message: Hi | |
Name: Two Message: Hi | |
Name: One Message: Hi | |
Name: Two Message: Hi | |
Name: One Message: Hi |