Click here to Skip to main content
14,216,780 members
Rate this:
Please Sign up or sign in to vote.
See more:
what is the exact name in the reference regarding this code?

using System.Linq;
using MyApp.AppCommands;
using System.Reflection;
using System.Collections.Generic;

What I have tried:

i tried to run the program for voice command and it needs this code
using System;
using System.Linq;
using MyApp.AppCommands;
using System.Reflection;
using System.Collections.Generic;

but i dont knw waht is the exact name in the reference
Posted
Updated 21-Jul-16 23:06pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The reference is separate from the using statement - the reference tells the system what assembly files to include, while the using is a "syntactic sugar" which lets you write
using MyAssembly;
and then use
MyClass mc = new MyClass();
Instead of having to write the full name each time:
MyAssembly.MyClass mc = new MyAssembly.MyClass();
Until you have added the reference, you can't use either form.
To add it, open the Solution Explorer pane, and open your project branch.
Right click the "References" branch, and select "Add reference..." use the dialog to locate the assembly - there are a number of ways you can do this depending on where the assembly file is - and tick the check box. In your case, it's probably MyApp.exe or MyApp.dll
Press OK to add the reference to the project.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100