知道任何C#语法高亮花样? [英] Know any C# syntax-highlighting tricks?

查看:131
本文介绍了知道任何C#语法高亮花样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常喜欢用黑色背景和白色/彩色文本代码,但我从来没有考虑改变我的语法高亮显示在Visual Studio中。

I usually prefer to code with a black background and white/coloured text but I had never taken the time to change my syntax-highlighting in Visual Studio.

昨天的时候当我终于可以吧我的变化之一是改变用户类型和用户类型(值类型),以不同的颜色。如果没有意识到这一点,我一直在使用一个结构类型来传递和方法返回的数据比我更会喜欢了。

Yesterday, when I finally got around to it one of my changes was to change User Types and User Types (Value Types) to different colors. Without realizing it, I had been using a struct type to pass and return data from methods more than I would have liked.

这改变语法高亮使得它非常明显发生了什么事情。所以这让我不知道是否还有其他设置,这可以提供类似的帮助。

This change in syntax-highlighting made it very apparent what was going on. So it made me wonder if there were other settings which could provide similar help.

我也通常设置我的文档和注释的颜色来更多的东西冲出来和被动,这样实际代码在你跳越来越方便快捷的通过代码撇得更快。

I also usually set my documentation and comment colours to something more washed out and passive so that actual code jumps more at you and makes quickly skimming through code faster.

你有任何其他提示这样可以帮助热点问题或使事情变得更加可读?

Do you have any other tips like this which can help spot issues or makes things more readable?

请注意:(我见过的这个帖子,但我正在寻找更多它们的功能和提供帮助,而不是纯粹的外观喜好的提示。)

Note: (I've seen this post, but I'm looking more for tips which are functional and provide help rather than purely cosmetic preferences.)

推荐答案

我把字符串惨不忍睹。黄色的背景。胆大。红前景。要提醒我,硬编码字符串一般是不好的,并尝试尽可能降到最低呢!

I make strings look horrible. Yellow background. Bold. Red foreground. To remind me that hardcoding strings is generally bad and to try as much as possible to minimize it!

这篇关于知道任何C#语法高亮花样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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