AVIFileVideoSource是“字段",但像“类型"一样使用 [英] AVIFileVideoSource is a 'field' but is used like a 'type'

查看:78
本文介绍了AVIFileVideoSource是“字段",但像“类型"一样使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//open video source
 private AVIFileVideoSource videoSource = null;


``LicensePlateRecognition1.LicensePlateRecognition.AVIFileVideoSource''是一个``字段'',但是却像一个``类型''一样使用

如果我的代码可以,有人可以告诉我一团错吗?错误在于主题.谢谢您


''LicensePlateRecognition1.LicensePlateRecognition.AVIFileVideoSource'' is a ''field'' but is used like a ''type''

can some1 pls tell me wad is wrong wif my code?? error is in the subject.Thank You

推荐答案

我可以推断的是

命名空间的名称是"LicensePlateRecognition1"
该类的名称是"LicensePlateRecognition"
变量的名称是"AVIFileVideoSource"
您可以在类内初始化变量.但是为了使用该变量完成某些工作,您需要在方法内部使用它.

因此,无论您尝试实现什么功能,都可以将其放入方法中.

例如:
命名空间LicensePlateRecognition1
{
公共类LicensePlateRecognition
{
公共无效somemethod()
{
字符串AVIFileVideoSource = null;
-做些工作-
}
}
}

这应该起作用...
What i could infer is

The name of the namespace is "LicensePlateRecognition1"
The name of the class is "LicensePlateRecognition"
The name of the variable is "AVIFileVideoSource"
You can initialize teh variable inside a class. But inorder to use that variable to do some work, you need to use it inside a method.

So whatever funtionality you try to acheive, make it inside a method.

For eg:
namespace LicensePlateRecognition1
{
public class LicensePlateRecognition
{
public void somemethod()
{
string AVIFileVideoSource = null;
--do some work--
}
}
}

This should work...


AceKiller写道:
AceKiller wrote:

AVIFileVideoSource

AVIFileVideoSource



看起来编译器无法理解AVIFileVideoSource是什么-请确保您包含正确的命名空间.



Looks like the compiler does not understand what AVIFileVideoSource is - make sure you have included the correct namespaces.


AceKiller写道:
AceKiller wrote:

"LicensePlateRecognition1.LicensePlateRecognition.AVIFileVideoSource"是字段",但其用法类似于类型"

''LicensePlateRecognition1.LicensePlateRecognition.AVIFileVideoSource'' is a ''field'' but is used like a ''type''



如果我没看错的话,项目AVIFileVideoSourceLicensePlateRecognition1对象中的一个字段,因此不能用作声明新对象"videoSource"的类型.但是,您只提供了一行代码,因此可能会有更多的信息来阐明这一点.



If I read this correctly the item AVIFileVideoSource is a field within the LicensePlateRecognition1 object, so cannot be used as a type to declare a new object ''videoSource''. However you have only provided one line of your code so there may be further information that would clarify this.


这篇关于AVIFileVideoSource是“字段",但像“类型"一样使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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