最好的方法摆脱匈牙利记号法? [英] Best way to get rid of hungarian notation?

查看:173
本文介绍了最好的方法摆脱匈牙利记号法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设你已经继承了一个C#代码库,它使用一个具有200个静态方法的类来提供核心功能(例如数据库查找)。在这个类中的许多恶梦中,有大量使用匈牙利符号(坏的类型)。

Let's say you've inherited a C# codebase that uses one class with 200 static methods to provide core functionality (such as database lookups). Of the many nightmares in that class, there's copious use of Hungarian notation (the bad kind).

你可以重构变量名称以删除匈牙利符号,

Would you refactor the variable names to remove the Hungarian notation, or would you leave them alone?

如果您选择更改所有变量以删除匈牙利语符号,您的方法是什么?

If you chose to change all the variables to remove Hungarian notation, what would be your method?

推荐答案

只要离开它。您的时间有更好的用途。

Just leave it alone. There are better uses of your time.

这篇关于最好的方法摆脱匈牙利记号法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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