void MyMethod(int arg1, int arg2) { CLR_RT_StackFrame* stackFrame = CLR_RT_Thread::GetThread()->CurrentFrame(); int firstArg = stackFrame->Arg0().NumericByRef().s4; // firstArg = arg1 }
int MyMethod() { CLR_RT_StackFrame* stackFrame = CLR_RT_Thread::GetThread()->CurrentFrame(); stackFrame->SetResult_I4(42); return 0; }These examples are part of the .NET Micro Framework library.