如何解决c#.net 4.5中的cs0118和cs0234错误。 [英] How do I resolve the cs0118 and cs0234 error in c#.net 4.5.

查看:359
本文介绍了如何解决c#.net 4.5中的cs0118和cs0234错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用带有ninjascript编程语言的c#4.5我有4个文件。

i在修复cs01519后出现了一些错误错误我得到cs0118错误-xyz.cs是一个namspace但是用作一个类型。

*另一个是cs0234-命名空间ninjascript.ninjatrder.indicator中不存在类型或命名空间名称'xyz (你错过了一个装配参考)



我尝试了什么:



Hi,

am using the c#4.5 with ninjascript programming languge i have 4 files.
i got some error afterfixing the cs01519 error am getting cs0118 error-xyz.cs is a namspace but used as a type.
*another one is cs0234-the type or namespace name 'xyz" doesnot exist in the namespace ninjascript.ninjatrder.indicator(are you missing a assembly reference)

What I have tried:

if( BuyLadderBrushDx != null)
			{BuyLadderBrushDx.Dispose();}

这是我更改了下面的代码i xyz.cs.insted。

this is i have changed code i xyz.cs.insted of below.

// BuyLadderBrushDx? Dispose; BuyLadderBrushDx = null;

//它在6.0 c#版本中我只有4.5所以o已经做了更改。

和lamda运算符是这将支持的错误在4.5c#中可以任意一个通知。

//its in 6.0 c# version ihave only 4.5 so o have made the changes.
and by the lamda operator is the error this will support in 4.5c# can any one inform.

ladder= ladder.Max(kv => kv.Value);}
      public long  GetPOCVolume(TradeSide side)
		{ladderBidAsk= ladderBidAsk[(int)side].Max(kv => kv.Value);}// before the line waspublic long getpocvolume(tradeside side)=>ladderbidask[(int)side].Max(kv.=>kv.value);//but here i had error cs1519 invalid token class member declaratione expected ; expected so on (so i had change the error above)this in b.cs file after changing this now am gettigng in xyz.cs file cs0118 and cs0234 errors.

    public long Volume()
		{ladder = ladder.Sum(kv => kv.Value);}

       public bool   IsEmpty()
		{ladder= ladder.Count > 0;}

推荐答案

了解如何使用Google



只需点击下面的链接。



了解命名空间并在C#中添加对程序集的引用


通过阅读这些文章尝试解决您的问题:

编译器错误CS0118 [ ^ ]

编译器错误CS0234(C#) [ ^ ]

排除.NET Framework定位错误 [ ^ ]
Try to resolve your issues by reading these articles:
Compiler Error CS0118[^]
Compiler Error CS0234 (C#)[^]
Troubleshooting .NET Framework Targeting Errors[^]


这篇关于如何解决c#.net 4.5中的cs0118和cs0234错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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