Created
June 24, 2021 11:27
-
-
Save Kritner/81e3e5a5c038244d10854fca41d7664b to your computer and use it in GitHub Desktop.
Trying out the new "record" type, hoping to get a solution for the xml documentation of properties vs constructor parameters
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
/// <summary> | |
/// Represents a blimey! | |
/// </summary> | |
/// <param name="Scoot"><inheritdoc cref="Scoot"/></param> | |
/// <param name="IsNeat"><inheritdoc cref="IsNeat"/></param> | |
public record Blimey(int Scoot, bool IsNeat) | |
{ | |
/// <summary> | |
/// The scoot | |
/// </summary> | |
public int Scoot { get; } = Scoot; | |
/// <summary> | |
/// Is the Blimey neat? | |
/// </summary> | |
public bool IsNeat { get; } = IsNeat; | |
} |
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
/// <summary> | |
/// Represents a bloop! | |
/// </summary> | |
/// <param name="Scoot">The scoot</param> | |
/// <param name="IsNeat">Is the bloop neat?</param> | |
public record Bloop(int Scoot, bool IsNeat) | |
{ | |
/// <summary> | |
/// The scoot | |
/// </summary> | |
public int Scoot { get; } = Scoot; | |
/// <summary> | |
/// Is the bloop neat? | |
/// </summary> | |
public bool IsNeat { get; } = IsNeat; | |
} |
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
/// <summary> | |
/// Represents a doot! | |
/// </summary> | |
/// <param name="Scoot">The scoot</param> | |
/// <param name="IsNeat">Is the doot neat?</param> | |
public record Doot(int Scoot, bool IsNeat); |
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 Test | |
{ | |
public void Bar() | |
{ | |
var doot = new Doot(42, true); | |
var bloop = new Bloop(42, true); | |
var blimey = new Blimey(42, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment