本文介绍了从Java到C#的int rosu = Color.red.getRGB()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在手动将代码从Java转换为C#,但我不知道如何转换
I am converting by hand a code from Java to C#, and I don''t know how to convert
private static int rosu = Color.Red.getRGB;
我收到此错误:
I get this error:
''System.Drawing.Color'' does not contain a definition for ''getRGB'' and no extension method ''getRGB'' accepting a first argument of type ''System.Drawing.Color'' could be found (are you missing a using directive or an assembly reference?)
我在这种情况下使用声明的"rosu":
I use the declared "rosu" in this context:
for (uy=0;uy<h;uy++)
for (ux=0;ux<w;ux++)
if(curba[uy][ux]==255)
curba[uy][ux]=rosu;
谢谢
Thank you
推荐答案
这篇关于从Java到C#的int rosu = Color.red.getRGB()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!