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
| obj?.Foo(); |
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 class Sample1 | |
| { | |
| public Sample1() | |
| { | |
| IsTrue = true; | |
| } | |
| public bool IsTrue { get; set; } | |
| } |
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 class Sample1 | |
| { | |
| public bool IsTrue { get; set; } = true; | |
| } |
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 class Gadget | |
| { | |
| public Gadget(int id, string name) | |
| { | |
| this.Id = id; | |
| this.Name = name; | |
| } | |
| public int Id { get; } | |
| public string Name { get; } |
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 class Gadget | |
| { | |
| public Gadget(int id, string name) | |
| { | |
| this.id = id; | |
| this.name = name; | |
| } | |
| private readonly int id; | |
| public int Id |
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 static System.Console; | |
| class Program | |
| { | |
| public void Main() | |
| { | |
| WriteLine("Hello, World!"); | |
| } | |
| } |
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
| [] { | |
| std::cout << "hello, lambda" << std::endl; | |
| }(); |
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
| Action l1 = () => Console.WriteLine("Hello, Lambda!"); | |
| l1(); |
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
| auto l1 = [] { | |
| std::cout << "hello, lambda" << std::endl; | |
| }; | |
| l1(); |
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
| Func<int> l2 = () => 42; | |
| int x2 = l2(); |
OlderNewer