向intptr添加整数 [英] adding an integer to an intptr

查看:95
本文介绍了向intptr添加整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.NET中添加一个整数到intptr(4.0版本的.NET版本),是否有方法或函数?

how can i add an integer to intptr in vb.NET (.NET version under 4.0), is there a method or a function for that?

我知道那里在.NET 4.0版本中,一个名为Intptr.Add的共享函数可以完成这项工作,但是我在.NET版本2.0下

i know there is in .NET version 4.0 a shared function called Intptr.Add that does the work, but i am under .NET version 2.0

代码是原始格式(C ++):

the code is in its original format (C++):

推荐答案

您好

不确定这是否有任何帮助,但是,这里是无论如何:

Not sure if this is of any help,but, here t is anyway:

    Dim ip As IntPtr = CType(12, IntPtr)
    ip += 1
    Console.WriteLine(ip)  '  result = 13


这篇关于向intptr添加整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆