Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I remove a namespace import from a linqpad query?

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 is one of the default imports in linqpad, but I rarely use it. Is it possible to remove that default namespace import, so I can use my own Formatting enum?

like image 232
recursive Avatar asked Jul 30 '14 16:07

recursive


1 Answers

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.

like image 198
Anthony Avatar answered Sep 30 '22 02:09

Anthony