Can I remove a namespace import from a linqpad query?

后端 未结 1 1891
慢半拍i
慢半拍i 2021-01-18 23:49

I am trying to run a linqpad query, but one of the default namespace imports has a type that is apparently shadowing the type I am trying to reference. System.Xml

相关标签:
1条回答
  • 2021-01-19 00:16

    This isn't a direct answer to your immediate question, but you can can tell LINQPad which one you want Formatting to mean. In your query, press the F4 key and then under the Additional Namespace Imports tab you can add the following:

    Formatting = Newtonsoft.Json.Formatting
    

    This tells LINQPad to declare a using alias directive for your script. Note that you should not include the word using before the line, LINQPad handles theat for you.

    0 讨论(0)
提交回复
热议问题