开发者

empty constructor while using bitmap

开发者 https://www.devze.com 2023-02-11 01:10 出处:网络
i have problem with using bitmap in console application in c#. I included system.drawing reference to work but while writing code the intelisense shows there isn\'t a开发者_高级运维ny suggestion for b

i have problem with using bitmap in console application in c#. I included system.drawing reference to work but while writing code the intelisense shows there isn't a开发者_高级运维ny suggestion for bitmap(X); (where X it the suggestion).

I am using C# 2010 express edition, created console application and added system drawing reference. I have problem with code:

Bitmap bitmap = new Bitmap(); // problem it that i don't see any suggestion from intelisense, but i need insert parameters

Hope i write logically, sorry for english.


Sounds like you're not referencing the Bitmap class from namespace System.Drawing -- fully qualifying the namspace may help (if you've got a conflicting Bitmap class from a different namespace) - also make sure that you're referencing the System.Drawing.dll assembly


As can be seen from Bitmap Class does not have a public parameterless constructor.

You have to use one of the constructors provided in the list on the provided page.


I don't know why you are not getting any intellisense suggestion, but just have a look on the Bitmap constructor overview. There you can see the various contructors you can use in order to create a new Bitmap instance. You should also check there is not a conflicting Bitmap class in another referenced library.

0

精彩评论

暂无评论...
验证码 换一张
取 消