The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers with rich code analysis APIs.
dotnet-maestro[bot] on dev17.0-vs-deps-e0b4ca26-1f06-4af7-a64c-cbf21a87cdc2
Update dependencies from https:… (compare)
dotnet-maestro[bot] on darc-main-cade8067-d43a-4b54-be3b-8af56421c413
dotnet-maestro[bot] on darc-main-cade8067-d43a-4b54-be3b-8af56421c413
dotnet-maestro[bot] on darc-main-cfe1a973-8b72-4fdf-9473-8959aea8fb8e
Update dependencies from https:… (compare)
void Whatever(YourParamType yourParamName) { }
it doesn't matter that it's just for your consumption
it makes in the sense that .NET is backward compatible, so "my" object code must continue working across versions
if this wasn't the case, we'd see a large amount of backward compatibility breakages accross new versions of .NET
public interface IMyInterface
{
public string Name { get; }
}
using System;
var myClass = new MyClass("name");
Console.WriteLine(myClass.Name);
class MyClass : IMyInterface
{
public MyClass(string name)
{
Name = name;
}
public string Name { get; }
}
IMyInterface
:public interface IMyInterface
{
public string Name { get; }
public string Description { get; }
}
Unhandled exception. System.TypeLoadException: Method 'get_Description' in type 'MyClass' from assembly 'ConsoleApp3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at Program.<Main>$(String[] args)
it's just an interface, so you can always just instantiate one yourself.
I thought the I*Symbol
types were interfaces because the domain benefitted from modeling multiple-inheritance in some cases and not meant for third-party implementation
there's even analyzers shipped in the Compiler SDK that prevent creating third-party implementations because the API surface won't be stable across compiler versions