且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从数组中选择随机字符串并将其显示在文本框中?

更新时间:2023-11-06 22:28:04

获取字符串:

String result = mexicanRestaurants[rand.Next(mexicanRestaurants.Length)]; 

然后将其设置为文本框:

Then to set it to the textbox:

txtResults.text = result;