在c#中使用网络摄像头的问题 [英] Problem with using webcam in c#

查看:126
本文介绍了在c#中使用网络摄像头的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i想在c#中使用网络摄像头,但是我有什么办法可以正常运行?

这就是问题

我的问题图片[ ^ ]

我尝试了很多代码,但代码有相同的错误,我的意思是这个错误

Hi i want to use webcam in c# but it has problem what should i do to run correctly?
this is the problem
\Picture of my problem[^]
and i try many code but al the codes have the same error, i mean this error

推荐答案

当你得到一个Null对象的异常时问这样一个问题,这个消息告诉你需要学习编程语法的基础知识。 :-)



这个 [ ^ ] MSDN的网页会教你 NullReferenceException 是什么,如何最小化它,以及它被引发的原因。这是一个简单的文本,告诉您要提供存在或具有的对象。



阅读这个 [ ^ 我的博客文章,了解它的一些概念以及最小化它的方法。
Asking such a question when you're getting an exception for an object being Null is a message telling that you need to learn the basic of programming syntax. :-)

This[^] web page at MSDN teaches you what a NullReferenceException is, how to minimize it, and why it gets raised. This is a simple text telling you want to provide an object that exists or has a value.

Read this[^] blog post of mine to learn a few concepts about it and the methods to minimize it.


插入break-代码中的点:在Visual Studio的调试模式下,单步执行代码(F11);找到发生空引用错误的位置,然后检查错误发生前的点处的变量:什么是'null,不应该是'null。



然后,在这里描述具体细节,并包括你的代码。



除非你学习了解决问题的基础知识,否则你从来没有能够以程序员的身份取得进步。
Insert break-points in your code: in Debug mode in Visual Studio, single-step through the execution of the code (F11); locate where the 'null reference' error is occurring, and then examine the variables at the point just before the error occurs: what is 'null that should not be 'null.

And, then, describe the specifics here, and include your code.

Unless you learn the basics of de-bugging, you are never going to be able to progress as a programmer.


这篇关于在c#中使用网络摄像头的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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