如何查找此代码的名称参考? [英] How to find the name reference of this code?

查看:149
本文介绍了如何查找此代码的名称参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于此代码的引用中的确切名称是什么?



使用System.Linq;

使用MyApp.AppCommands;

使用System.Reflection;

使用System.Collections.Generic;



我试过的:



i试图运行语音命令程序,它需要这个代码

使用系统;

使用System.Linq;

使用MyApp.AppCommands;

使用System.Reflection;

使用System.Collections.Generic;



但是我不知道是参考中的确切名称

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

推荐答案

reference 分开使用语句 - 引用告诉系统哪些程序集文件包含,而使用是一个语法糖,它可以让你写出

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();

直到你拥有添加了引用,你不能使用任何一种形式。

要添加它,打开解决方案资源管理器窗格,然后打开你的项目分支。

右键单击引用分支,并选择添加引用...使用该对话框来定位程序集 - 根据程序集文件的位置,有多种方法可以执行此操作 - 并勾选复选框。在您的情况下,它可能是MyApp.exe或MyApp.dll

按OK添加对项目的引用。

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.


这篇关于如何查找此代码的名称参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆