This file contains 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 Class Customer | |
Public ReadOnly Property First As String = "Jane" | |
Public ReadOnly Property Last As String = "Doe" | |
End Class |
This file contains 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
var s = $"{p.Name} is {p.Age} year{{s}} old"; |
This file contains 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
Dim s = $"{p.Name} is {p.Age} year{{s}} old" |
This file contains 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
int length = customers?.Length ?? 0; // 0 if customers is null |
This file contains 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
Dim length As Integer = If(customers?.Length, 0) ' 0 if customers is null |
This file contains 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
if (x == null) throw new ArgumentNullException(nameof(x)); |
This file contains 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
If x Is Nothing Then Throw New ArgumentNullException(NameOf(x)) |
This file contains 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 class Customer | |
{ | |
public string First { get; } = "Jane"; | |
public string Last { get; } = "Doe"; | |
} |
This file contains 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
open System | |
type T() = | |
member __.F1(arg1 : string byref, arg2, arg3 : Nullable<int>, arg4 : bool) = | |
arg1 <- arg1 | |
__.F2(arg1, arg2, arg3, arg4) | |
member __.F2(_ : string, _ : obj, arg : Nullable<int>, _ : bool) = | |
Console.WriteLine("{0}", arg) // prints "random" number | |
This file contains 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
// This repro documents a minimal example of the RyuJIT tail call issue (July 2015). | |
// All of the characteristics described in the repro need to be present to trigger the bad codegen. | |
using System; | |
// Simple struct containing two integers (size 8). | |
struct MyStruct | |
{ | |
public MyStruct(int a, int b) | |
{ | |
A = a; |