Create namespaces within LINQPad?
I realize LINQPad can reference namespaces of existing .NET assemblies that are externally referenced. But I'd like to be able to create my own namespaces within LINQPad.
I like to create my code LINQPad before transferring it over to Visual Studio. It's much easier to debug in LINQPad IMHO, than in Visual Studio, especially when dumping complex variables with the Dump() method. But my code is large enough that it needs to be broken up into different namespaces. Perhaps I'm using LINQPad in ways it wasn't designed for?
Perhaps a better solution is creating a LINQPad visualizer in Visual Studio? I remember reading about it years ago.
TIA Steve
Comments
You can define namespaces in LINQPad 6. Set the language to 'C# Program' and enter the following:
Currently I'm using LINQPad 5 and the above does NOT work. If I upgrade to LINQPad 6, can I still run the classic .NET framework? Or am I restricted to .NET Core?
The workaround for LINQPad 5:
Ignore the above reply. I didn't pay attention to extra and missing braces.I got your sample working!