如何获得自定义创建的类智能感知? [英] How to get intellisense for custom created classes?

查看:156
本文介绍了如何获得自定义创建的类智能感知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你键入这一点。 ,你通常得到的所有程序,事件和更多...当前类,你都在。当你站在只是在上一长串的例程一个没有选择一个,你通常会得到它旁边的描述。



我怎样才能做到这一点?
设假设我有两个套路一类叫做CAR:)speed_up()和制动(。
我如何用我的班级看到的两个功能的描述会使人时,他的类型:

  CAR mycar =新车(); 
mycar。


解决方案

以上一类或方法,而不是 //的评论。如果你做一个///三斜杠(或称为XML注释),它执行一个捷径,让您填写的信息出你正在评论类或方法。



这将出现在你的代码,例如

  /// <总结> 
///
///< /总结>
///< PARAM NAME =发件人>< /参数>
///< PARAM NAME =E>< /参数>
void方法(对象发件人,EventArgs五)

当你再访问类或方法通过智能感知,多数民众赞成在描述将出现。


When you type "this." , you usually get all the routines, events, and more... of the current class you are in. And when you simply stand over one of the routines in the long list without choosing one, you usually get a description next to it.

How can I do that ? Let assume I have a class called CAR with two routines: speed_up(), and brake(). How can I make the person using my class to see a description of the two functions when he types:

CAR mycar = new CAR();
mycar.

解决方案

Above a class or a method, rather than a "//" comment. if you do a "///" triple slash ( otherwise known as an XML comment ), it performs a short cut to allow you to fill information out about the class or method you are commenting on.

This then appears in your code as such

    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    void Method(object sender, EventArgs e)

When you then access the class or method through intellisense thats when the description will appear.

这篇关于如何获得自定义创建的类智能感知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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