c# - Reason for Invalid Token message -
in following code receiving "invalid token" error message. following this tutorial not sure how fix this.
class convertbitmap { [system.runtime.interopservices.dllimport("gdi32.dll")] public static extern bool deleteobject(intptr handle); public static bitmapsource; public static intptr intpointer; public static bitmapsource bitmaptobitmapsource(system.drawing.bitmap bitmap) { intpointer = bitmap.gethbitmap(); bitmapsource = system.windows.interop.imaging.createbitmapsourcefromhbitmap(intpointer, intptr.zero,
the error happens @ end of line:
public static bitmapsource;
errors:
error 1 invalid token ';' in class, struct, or interface member declaration c:\users\mona\documents\visual studio 2013\projects\wpf1\wpf1\convertbitmap.cs 10 35 wpf1 error 2 name 'bitmapsource' not exist in current context c:\users\mona\documents\visual studio 2013\projects\wpf1\wpf1\convertbitmap.cs 16 13 wpf1 error 4 type or namespace name 'pxcmsensemanager' not found (are missing using directive or assembly reference?) c:\users\mona\documents\visual studio 2013\projects\wpf1\wpf1\mainwindow.xaml.cs 15 17 wpf1
Comments
Post a Comment