VB.NET + GUID创建30位数字 [英] VB.NET + GUID creation in 30 digits

查看:117
本文介绍了VB.NET + GUID创建30位数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在我正在做一个vb.net桌面应用程序,在其中我必须构造GUID.尽管在我们的VB.NET中具有诸如"System.Guid.NewGuid.ToString()"之类的内置功能来获取GUID,但我仍需要通过vb.net按照以下提到的条件以30位数字创建GUID.

应用程序使用来自5个不同来源的信息来构造GUID(30位数字).不同的来源是当前系统时间,系统时间的毫秒数,应用程序的进程ID,系统物理内存状态以及最后的组对象标识符号.


8位4位8位8位2位
系统时间毫秒进程ID内存状态组标识符

例如:

当前时间+毫秒+进程ID +内存状态+条件ID.
"104a340e" +"00a4" +"000023a5" +"b657c410" +"09" ="104a340e00a4000023a5b657c41009"

现在,我手上有最后一个属性组标识符"(2digits).

我必须使用vb.net创建其他项(系统时间,毫秒,进程ID和内存状态). vb.net中有可用的内置函数来创建它们吗?

我不确定如何获取上述值来构造GUID?谁能帮助我实现这一目标.这对我会更有用.

谢谢,
Sivakumar IRIAD

Hi,

Now i am doing a vb.net desktop application, In which i have to construct GUID. Eventhough having a built-in function in our VB.NET like "System.Guid.NewGuid.ToString()" to get GUID, I need to create the GUID in 30 digits in the below mentioned criteria through vb.net.

Application constructs the GUID (30 digits) using the information from the 5 different sources. The different sources are Current system time, millisecond of the system time, Process ID for the application, system physical memory status and finally the group object identifier number.


8 digits 4 digits 8 digits 8 digits 2 digits
System Time Millisecond Process ID Memory status Group Identifier

Ex:

Current Time + Millisecond + Process ID + memory status + Condition ID.
"104a340e"+"00a4"+"000023a5"+"b657c410"+"09" = "104a340e00a4000023a5b657c41009"

Now, I have the last attribute "Group identifier"(2digits) in my hand.

I have to create the other items (System Time,Millisecond,Process ID and Memory status) using vb.net. Is there any built in functions available in vb.net to create them?

I am not sure how to get the above values to construct the GUID? Can anyone help me to achieve this. This will be more helpful for me.

Thanks,
Sivakumar IRIAD

推荐答案

如果没有内置的方法可以执行此操作.

因此,不要那么懒惰,学习使用搜索引擎.我什至会帮助第一个.

搜索 vb.net系统时间
You probably would not have been asked to do this, if there were not built in ways to do this.

So don''t be so lazy, learn to use a search engine. I''ll even help with the first one.

Search on vb.net system time


这篇关于VB.NET + GUID创建30位数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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