Here is my method call:
var span = m_tracer.StartActiveSpan("FileTrace", SpanKind.Internal, in parentContext, null, null, startTime);
The method signature is defined as such:
public TelemetrySpan StartActiveSpan(
string name,
SpanKind kind = SpanKind.Internal,
in SpanContext parentContext = default,
SpanAttributes? initialAttributes = null,
IEnumerable<Link>? links = null,
DateTimeOffset startTime = default)
As you can see, the third parameter is decorated with the in qualifier. I must comply. The editor doesn’t complain –
But when I compile, here’s the result:
I threw the #error version in there so you can see what version of the compiler I am using. v9.0. (I also get the same error for v7.3.) Since the in keyword was introduced with C# v7.2 I am at a loss to understand this compiler error. Thanks for any advice which you can provide.