[Mono-bugs] [Bug 36055][Wis] New - Pointers error: Dont update the true value.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
23 Dec 2002 13:12:37 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by raciel@es.gnu.org.
http://bugzilla.ximian.com/show_bug.cgi?id=36055
--- shadow/36055 Mon Dec 23 08:12:37 2002
+++ shadow/36055.tmp.25054 Mon Dec 23 08:12:37 2002
@@ -0,0 +1,37 @@
+Bug#: 36055
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: raciel@es.gnu.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Pointers error: Dont update the true value.
+
+I have made the following pointers sample and when I assign *p=3 it might
+update the d.x value but when I write d.x it prints 4 value instead 3.
+
+using System;
+
+class CData
+{
+ public int x;
+ public CData() { this.x=4; } }
+ class CProgram
+ {
+ public unsafe static void Main()
+ {
+ CData d=new CData();
+ int *p=&d.x;
+ *p=3;
+ Console.WriteLine ("{0}", d.x);
+ }
+}