KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here? class TestClass { int iMyVariable; static void Main() { TestClass oTestClass = new TestClass(); unsafe { fixed (int* p = &oTestClasst.iMyVariable) { *p = 9; } } } }
Tags (comma-separated)
Save Edits
Cancel