#Region最佳做法 [英] #Region Best Practices

查看:110
本文介绍了#Region最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建Windows窗体时,如何使用#Region有任何指导吗?我缺少某个地方的标准吗?有人对使用#Region有任何建议吗?

我想确保我的代码正确组织.

谢谢,

〜Jack

Is there any guidance on how to use #Region when creating a windows form? Is there a standard somewhere that I am missing? Does anyone have any suggestions for using #Region?

I would like to make sure my code is organized correctly.

Thanks,

~Jack

推荐答案

这就是您所能做的一切:我倾向于创建区域来对相关项目进行分组;例如所有属性或所有替代或所有按钮事件.我认为没有硬性规定,但常识告诉我,使用区域的方式(如果没有其他规定)是合理的.
That''s about all you can do: I tend to create regions to group related items; for instance all properties or all overrides or all button events. I don''t think there are any hard and fast rules but common sense tells me that the way I use regions is, if nothing else, reasonably sensible.


这篇关于#Region最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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