无效令牌消息的原因

时间:2015-05-31 00:49:21

标签: c# visual-studio realsense

在以下代码中,我收到了#34;无效令牌"错误信息。我关注this tutorial,但我不知道如何解决这个问题。

 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,

错误发生在这一行的末尾:

public static BitmapSource;

错误:

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   The name 'bitmapSource' does not exist in the current context   C:\Users\Mona\Documents\Visual Studio 2013\Projects\wpf1\wpf1\ConvertBitmap.cs  16  13  wpf1
Error   4   The type or namespace name 'PXCMSenseManager' could not be found (are you missing a using directive or an assembly reference?)  c:\users\mona\documents\visual studio 2013\projects\wpf1\wpf1\mainwindow.xaml.cs    15  17  wpf1

0 个答案:

没有答案
相关问题