README suggests the following:
[LobbyCompatibility(CompatibilityLevel = CompatibilityLevel.Everyone, VersionStrictness = VersionStrictness.Minor)]
But is does not compile:
There is no argument given that corresponds to the required parameter 'compatibilityLevel' of 'LobbyCompatibilityAttribute.LobbyCompatibilityAttribute(CompatibilityLevel, VersionStrictness)'CS7036
Because
-
the signature of Attribute's constructor has parameters whose names start with lowercase:
public LobbyCompatibilityAttribute(CompatibilityLevel compatibilityLevel, VersionStrictness versionStrictness)
and...
-
the correct syntax is to use double-colon for named parameters or not using names at all.
[LobbyCompatibility(compatibilityLevel: CompatibilityLevel.Everyone, versionStrictness: VersionStrictness.Minor)]
[LobbyCompatibility(CompatibilityLevel.Everyone, VersionStrictness.Minor)]
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes#2223-positional-and-named-parameters
README suggests the following:
But is does not compile:
Because
the signature of Attribute's constructor has parameters whose names start with lowercase:
and...
the correct syntax is to use double-colon for named parameters or not using names at all.
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes#2223-positional-and-named-parameters