Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
1.00/5 (1 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

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
C#
using MyAssembly;
and then use
C#
MyClass mc = new MyClass();
Instead of having to write the full name each time:
C#
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900