fix .net 2.0 compilation issues

Signed-off-by: Tony Qu <tonyqus@gmail.com>
fix .net 2.0 compilation issue

Signed-off-by: Tony Qu <tonyqus@gmail.com>