+ namespace NS
+ {
+ using o = System.Object;
+ partial class C : o {}
+ partial class C : object {}
+ partial class C : System.Object {}
+ }
+
+ all three declarations for class C are equivalent and result in the same symbol table object
+ for C. However, these using alias symbols do appear in the results of certain SemanticModel
+ APIs. Specifically, for the base clause of the first of C's class declarations, the
+ following APIs may produce a result that contains an AliasSymbol:
+ + SemanticInfo SemanticModel.GetSemanticInfo(ExpressionSyntax expression); + SemanticInfo SemanticModel.BindExpression(CSharpSyntaxNode location, ExpressionSyntax expression); + SemanticInfo SemanticModel.BindType(CSharpSyntaxNode location, ExpressionSyntax type); + SemanticInfo SemanticModel.BindNamespaceOrType(CSharpSyntaxNode location, ExpressionSyntax type); ++ Also, the following are affected if container==null (and, for the latter, when arity==null + or arity==0): +
+ IList<string> SemanticModel.LookupNames(CSharpSyntaxNode location, NamespaceOrTypeSymbol container = null, LookupOptions options = LookupOptions.Default, List<string> result = null); + IList<Symbol> SemanticModel.LookupSymbols(CSharpSyntaxNode location, NamespaceOrTypeSymbol container = null, string name = null, int? arity = null, LookupOptions options = LookupOptions.Default, List<Symbol> results = null); ++
+ (int x, int y) M() { ... }
+
+
+ will be encoded using an attribute on the return type as follows
+
+
+ [return: TupleElementNamesAttribute(new[] { "x", "y" })]
+ System.ValueTuple<int, int> M() { ... }
+
+
+ class C : BaseType<((int e1, int e2) e3, int e4)< { ... }
+
+
+ becomes
+
+
+ [TupleElementNamesAttribute(new[] { "e3", "e4", "e1", "e2" });
+ class C : BaseType<System.ValueTuple<
+ System.ValueTuple<int,int>, int>
+ { ... }
+
+
+ using (var localVariable = new StreamReader("C:\\Temp\\MyFile.txt")) { ... }
+
+ using T x = expr, y = expr;)
+
+
+ The node that declares the resource storage, e.g. x = expr in using T x = expr, y = expr;.
+
+ using T x = expr, y = expr;)
+
+
+ The node that declares the resource storage, e.g. x = expr in using T x = expr, y = expr;.
+
+ attribute-list* ('async' | 'static')* type? ('(' | identifier) ...
+ For better error recovery 'static =>' is also considered a possible lambda expression.
+
+ using var array = TemporaryArray<T>.Empty;
+
+ // Using the 'Unsafe.AsRef' method
+ Method(ref Unsafe.AsRef(in array));
+
+ // Using this helper method
+ Method(ref array.AsRef());
+
+
+
+ partial class Outer
+ {
+ partial class Inner
+ {
+ public void Method()
+ {
+ }
+ }
+ }
+
+
+ /// Second.cs:
+
+ partial class Outer
+ {
+ partial class Inner
+ {
+ }
+ }
+
+
+ When navigating to the definition of "Outer" we know about First.cs because of the MethodDebugInfo for Outer.Inner.Method()
+ but there would be no document information for Second.cs so this method would return that information.
+
+ When navigating to "Inner" we likewise know about First.cs because of the MethodDebugInfo, and we know about Second.cs because
+ of the document info for its containing type, so this method would not return information for Inner. In fact this method
+ will never return information for any nested type.
+ true if arithmetic operations behind this loop are 'checked'.
+ new C() { 1, 2, 3 }, we will have
+ 3 New C() From {1, 2, 3} will have 3 new C() { do1, do2, do3 } where
+ the doX objects are of type dynamic, we'll have 3 New C() From {do1, do2, do3} will generate 3 var in C#).
+ Target ??= Value.
+ true if this is a 'lifted' range operation. When there is an
+ operator that is defined to work on a value type, 'lifted' operators are
+ created to work on the Deconstruct
+ method, the type System.Runtime.CompilerServices.ITuple, or null (for example, in
+ error cases or when matching a tuple type).
+ var in C#).
+ this and base in C# code, and Me,
+ MyClass, MyBase in VB code.
+ using XML node in PDB tests.
+ forward XML node in PDB tests.
+ forwardToModule XML node in PDB tests.
+ hoistedLocalScopes XML node in PDB tests.
+ Equivalent to forwardIterator XML node in PDB tests.
+ dynamicLocals XML node in PDB tests.
+ Equivalent to encLocalSlotMap XML node in PDB tests.
+ Equivalent to encLambdaMap XML node in PDB tests.
+ Equivalent to tupleElementNames XML node in PDB tests.
+ Equivalent to encStateMachineStateMap XML node in PDB tests.
+ Equivalent to Typically a user analyzer has a reference to the compiler and some of the compiler's + dependencies such as System.Collections.Immutable. For the analyzer to correctly + interoperate with the compiler that created it, we need to ensure that we always use the + compiler's version of a given assembly over the analyzer's version.
+ +If we neglect to do this, then in the case where the user ships the compiler or its + dependencies in the analyzer's bin directory, we could end up loading a separate + instance of those assemblies in the process of loading the analyzer, which will surface + as a failure to load the analyzer.
+out parameter.
+ false,
+ then the branch true,
+ then the branch Static local variable. This region will only be executed
+ the first time a function is called.
+ default(Enumerator), and will null reference in these cases. Calling default(Enumerator), and will null reference in these cases. Calling + 0.Mantissa * 10^Exponent ++ The Mantissa buffer stores the mantissa digits as characters in a string. + The MantissaCount gives the number of digits present in the Mantissa buffer. + There shall be neither leading nor trailing zero digits in the Mantissa. + Note that this represents only nonnegative floating-point literals; the + negative sign in C# and VB is actually a separate unary negation operator. +
+ #r "dir1\a.dll"
+ #r "dir2\b.dll"
+
+ where both a.dll and b.dll reference x.dll, which is present only in dir2. Let's assume the resolver first
+ attempts to resolve "x" referenced from "dir1\a.dll". The resolver may fail to find the dependency if it only
+ looks up the directory containing the referencing assembly (dir1). If we recorded and this failure immediately
+ we would not call the resolver to resolve "x" within the context of "dir2\b.dll" (or any other referencing assembly).
+
+ This behavior would ensure consistency and if the types from x.dll do leak thru to the script compilation, but it
+ would result in a missing assembly error. By recording the failure after all resolution attempts are complete
+ we also achieve a consistent behavior but are able to bind the reference to "x.dll". Besides, this approach
+ also avoids dependency on the order in which we evaluate the assembly references in the scenario above.
+ In general, the result of the resolution may still depend on the order of #r - if there are different assemblies
+ of the same identity in different directories.
+
+ using XAttribute = System.CLSCompliantAttribute;
+ [X]
+ class C { }
+
+ Then
+
+ using (var localVariable = new StreamReader(path)) { ... }
+
+
+ int x = 3;
+ RunWithActionCallback(() => this.DoSomething(x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledAction(arg => arg.self.DoSomething(arg.x), (self: this, x), out Action action);
+ RunWithActionCallback(action);
+
+
+ int x = 3;
+ RunWithActionCallback(a => this.DoSomething(a, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledAction((a, arg) => arg.self.DoSomething(a, arg.x), (self: this, x), out Action<int> action);
+ RunWithActionCallback(action);
+
+
+ int x = 3;
+ RunWithActionCallback((a, b) => this.DoSomething(a, b, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledAction((a, b, arg) => arg.self.DoSomething(a, b, arg.x), (self: this, x), out Action<int, int> action);
+ RunWithActionCallback(action);
+
+
+ int x = 3;
+ RunWithActionCallback((a, b, c) => this.DoSomething(a, b, c, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledAction((a, b, c, arg) => arg.self.DoSomething(a, b, c, arg.x), (self: this, x), out Action<int, int, int> action);
+ RunWithActionCallback(action);
+
+
+ int x = 3;
+ RunWithPredicate(() => this.IsSomething(x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledFunction(arg => arg.self.IsSomething(arg.x), (self: this, x), out Func<bool> predicate);
+ RunWithPredicate(predicate);
+
+
+ int x = 3;
+ RunWithPredicate(a => this.IsSomething(a, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledFunction((a, arg) => arg.self.IsSomething(a, arg.x), (self: this, x), out Func<int, bool> predicate);
+ RunWithPredicate(predicate);
+
+
+ int x = 3;
+ RunWithPredicate((a, b) => this.IsSomething(a, b, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledFunction((a, b, arg) => arg.self.IsSomething(a, b, arg.x), (self: this, x), out Func<int, int, bool> predicate);
+ RunWithPredicate(predicate);
+
+
+ int x = 3;
+ RunWithPredicate((a, b, c) => this.IsSomething(a, b, c, x));
+
+
+
+ int x = 3;
+ using var _ = GetPooledFunction((a, b, c, arg) => arg.self.IsSomething(a, b, c, arg.x), (self: this, x), out Func<int, int, int, bool> predicate);
+ RunWithPredicate(predicate);
+
+