Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the C# interactive window interact with my code?

People also ask

Does Can-C work for cataracts?

By managing cataracts with Can-C, some patients may be able to avoid cataract surgery and keep their own natural lens. Cataract surgery is an in-office or outpatient procedure done without the need for general anesthetic. The diseased lens is removed and replaced.

Can-C contain N alpha Acetylcarnosine?

A popular eye drop 'Can-C' containing N-alpha-acetylcarnosine (NAC) claims to reduce, reverse and slow the development of senile cataract. It was developed and is patented by Professor Babizhayev, a bio-physicist and Executive Director of Innovative Vision Products (IVP) [1].

What are Can-C eye drops?

Can-C Eye Drops help to soothe and rejuvenate tired eyes, helps with macular degeneration, cataracts and other age related eye disorders. Can-C eye drops for cataracts contain lubricants, an antioxidant and an anti-glycating agent, N-Acetyl-Carnosine (NAC).

How long can you use Can-C eye drops?

Do not use this medication for longer than 3 to 4 days at a time.


When using Visual Studio 2015:

You can open the Interactive window by navigating to Views > Other Windows > C# Interactive,

Then just right click your project and run Initialize Interactive with Project from the context menu.


For older versions:

To use the C# Interactive Window with your code, ensure you first compile your code, then add a reference to the resulting assembly with the #r command like so:

C# command prompt


You can also use the Immediate Window to interact with your code as well, like so:

Immediate Window


You can use classes from your own project.
Just right click on your solution and select "Reset Interactive from Project".

If you need more information, here is the source:
Using the C# Interactive Window that comes with Roslyn – Part 2


Just an update from the @Botz3000 answer.

The command you want to find is now called "Initialize Interactive with Project"

enter image description here

Also it is worth noting i could not find this command if my C# interactive window was not viewable.


It's worth noting that the feature isn't yet supported in VS 2019 for .Net Core project.

You won't find the option, and it's a known issue as highlighted in this answer "Initialize interactive with Project" is missing for .Net Core Projects in Visual Studio 2019

The workaround is to use #r command (#r "Path/MyDll.dll") to load the assembly manually as seen in the answer above.