迁移方法兰特(INT)可视Fox专业,以C#.NET [英] migrate method Rand(int) Visual Fox Pro to C#.net

查看:141
本文介绍了迁移方法兰特(INT)可视Fox专业,以C#.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我移植一个Visual Fox专业code到C#。 NET

I'm migrating a Visual Fox Pro code to C #. NET

什么使Visual Fox专业: 产生的5位数字(48963)的基础上的文本字符串(在一个文本框捕捉)的字符串,如果你总是输入相同的文本字符串,将得到的字符串总是5位(无反转),我的code C语言#。 NET应该产生相同的字符串。

What makes the Visual Fox Pro: generates a string of 5 digits ("48963") based on a text string (captured in a textbox), if you always enter the same text string will get that string always 5 digits (no reverse), my code in C #. NET should generate the same string.

我要迁移以下code(视觉Fox专业6到C#)

I want to migrate the following code (Visual Fox Pro 6 to C#)

gnLower = 1000
gnUpper = 100000
vcad = 1
For y=gnLower to gnUpper step 52
    genClave = **Rand(vcad)** * y
    vRound = allt(str(int(genclave)))
    IF Len(vRound) = 3
            vDec = Right(allt(str(genClave,10,2)), 2)
            finClave = vRound+vDec
            Thisform.txtPass.value = Rand(971);
    Exit
    Endif
Next y

输出:

vcad = 1 return: 99905 vcad = 2 return: 10077 vcad = thanks return: 17200

thks!

thks!

推荐答案

我张贴在您的其他问题 HTTP ://foxcentral.net/microsoft/vfptoolkitnet.htm VFP的工具包,用于.NET可能具有相同兰特发生器功能

as i posted in your other question http://foxcentral.net/microsoft/vfptoolkitnet.htm the VFP toolkit for .net might have the same rand generator function

这篇关于迁移方法兰特(INT)可视Fox专业,以C#.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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