How to

access members of pointer to structure

Published: 15. January 2009 | Updated: 15. January 2009
License: Microsoft Public License (MS-PL)
Categories: Framework » Unsafe Code
Tags: C# Unsafe
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Drawing;

Code

Point point = new Point(10, 20);

Point* pointerToPoint = &point;

pointerToPoint->X = 50;

Console.WriteLine(point.X);
Console Output:
50
Send us feedback about this snippet »



Related Snippets: