#pragma警告禁用代码列表及其含义 [英] List of #pragma warning disable codes and what they mean

查看:104
本文介绍了#pragma警告禁用代码列表及其含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

禁用警告的语法如下:

#pragma warning disable 414, 3021

或更笼统地说:

#pragma warning disable [CSV list of numeric codes]

是否存在这些数字列表以及他们正在抑制的警告的说明?令我非常恼火的是,我似乎无法通过Google找到它。

Is there a list of these numeric codes and the description of the warning that they're suppressing? Much to my chagrin, I can't seem to locate it via Google.

推荐答案

您不需要列表。编译器会告诉您。如果您收到指示警告CS0168的编译器错误,则将168添加到列表中(或者,更好的是,修复代码)。

You shouldn't need a list. The compiler will tell you. If you get a compiler error that says "warning CS0168", then add 168 to the list (or, better yet, fix the code).

这篇关于#pragma警告禁用代码列表及其含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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