Updated with review feedback.
[mono.git] / mcs / errors / cs0266-14.cs
1 // CS0266: Cannot implicitly convert type `System.IntPtr' to `byte*'. An explicit conversion exists (are you missing a cast?)
2 // Line: 23
3 // Compiler options: -unsafe
4
5 using System;
6
7 public class Pixbuf {
8         static void Main (string [] args)
9         {
10                 Bug ();
11         }
12
13         public IntPtr Pixels {
14                 get {
15                         return IntPtr.Zero;
16                 }
17         }
18         public static unsafe void Bug ()
19         {
20                 Pixbuf pixbuf = null;
21                 //should be:
22                 //byte *pix = (byte *)pixbuf.Pixels;
23                 byte *pix = pixbuf.Pixels;
24         }
25 }
26
27
28