You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicasync Task DoStuffAsync(){// ... some code ...usingvarbuffer=new MemoryStream();await File.WriteToStreamAsync(buffer);
UseBuffer(buffer.ToArray());}
Throws the following exception when building:
Analyzer 'CodeCracker.CSharp.Usage.DisposableVariableNotDisposedAnalyzer' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. (Parameter 'syntax')'.
Changing it to the old syntax works fine:
publicasync Task DoStuffAsync(){// ... some code ...using(varbuffer=new MemoryStream()){await File.WriteToStreamAsync(buffer);
UseBuffer(buffer.ToArray());}}
However, this doesn't break always. I do have other cases in the same project, where the new syntax works and again some, where it doesn't work. So it's hard to create a generic replication project, but for those methods where it doesn't work, it fails every single time, I try to compile it with the new syntax and works every single time, I try to compile it with the old syntax.
The text was updated successfully, but these errors were encountered:
The following code:
Throws the following exception when building:
Changing it to the old syntax works fine:
However, this doesn't break always. I do have other cases in the same project, where the new syntax works and again some, where it doesn't work. So it's hard to create a generic replication project, but for those methods where it doesn't work, it fails every single time, I try to compile it with the new syntax and works every single time, I try to compile it with the old syntax.
The text was updated successfully, but these errors were encountered: