“ $”代表什么在Delphi中的数字之前是什么意思? [英] What does "$" mean before a number in Delphi?

查看:103
本文介绍了“ $”代表什么在Delphi中的数字之前是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Delphi代码转换为vb.net,但我不确定这一行:

I'm trying to convert Delphi code to vb.net and I'm not sure about this line:

stream.Seek($42, soFromBeginning);

我熟悉在文件流上使用seek(在vb.net中),但我不确定关于 $ 42

I'm familiar with using seek on filestreams (in vb.net) but I'm not sure about the $42.

我假设这与一个头寸相对应,但是它如何转换为vb。

I'm assuming that corresponds to a position, but how does that translate to vb.net?

推荐答案

$是十六进制常量的前缀。在VB.NET中,该值为& H,因此您应编写& H42。

$ is the prefix for a hexadecimal constant. In VB.NET, that's &H, so you would write &H42.

这篇关于“ $”代表什么在Delphi中的数字之前是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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