列表格式转换器帮助 [英] List format converter help

查看:71
本文介绍了列表格式转换器帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我仍然习惯使用VB.NET,因为我没有太多时间玩它,并且自从vb6时代以来没有做过很多编码。无论如何,我正在为我和我的业务合作伙伴处理一个小型个人项目来处理某些客户信息。



基本上它只有几个文本框和按钮输入信息,姓名,帐户状态,联系信息等。然后将信息加载到列表中并保存。信息之间有一些不同的列表框,例如,以前的客户,当前客户,未结余额等。



我希望通过这个程序让我们的生活更轻松,并且遇到一个问题,弄清楚如何做到这一点很简单我认为。我太生疏了,马上就把它搞清楚了。当我们从列表中导入/导出帐户时(在程序之外),它的格式如下:



名称 - 住宅/商业 - 帐户状态



我想添加的功能是为了不同的目的而不同地格式化列表。有时我们需要在导出/导入的3个数据之间格式化的列表,有时我们需要:。我知道要简单地创建一个函数来加载一个格式为



user:account:status的列表并将其转换为user - account状态



如果可能的话,也希望能够在转换中更改订单,而不是将user:account:status更改为account :状态:用户等。



为了我的生活,我不能快速地回到编码中,以便能够如此简单地找到一些东西。抱歉这本书,并提前感谢所有帮助,任何人都可以给我这个!如果是这个问题的任何星座我现在正在使用Visual Studio 2013.



我尝试了什么:



我可以从3个单独的文本框中导出数据,首选符号将它们分开,但在我的生活中无法弄清楚如何导入文件并输入正确的数据在正确的框中或重新格式化它的分离方式

So I'm still getting use to VB.NET as I haven't had much time to play with it, and haven't done alot of coding since back in the vb6 days. Anyways, I'm working on a small personal project for me and my business partner to handle certain customer information.

Basically it just has a few text boxes and buttons to enter information, name, account status, contact info, ect. then loads the information into a list and saves it. There's a few different list boxes the information moves between, for instance, previous customer, current customer, outstanding balance, ect.

What I'm wanting to do to make our lives easier with this program and running into an issue figuring out HOW to do it is quite simple I think. I'm just too rusty to figure it out right away. When we import/export an account from or to a list (Outside the program) it's formatted like so:

"Name - Residential/Business - Account Status"

What I'd like to add is a feature to format the list differently for different purposes. Sometimes we need the list formatted with a - between the 3 pieces of data exported/imported, sometimes we need a :. I know it HAS to be simple to make a function to load a list that's formatted like

"user:account:status" and convert it to "user - account - status"

Also would like to be able to change the order as well in the conversion if possible, instead of per say "user:account:status" to "account:status:user" ect.

Just can't for the life of me get my head back into coding quickly enough to figure something so simple out. Sorry for the book and thanks in advance for ALL help ANYONE might give me on this! If it's any constellation to the matter I'm using Visual Studio 2013 at the moment.

What I have tried:

I can export the data from 3 separate text boxes with the preferred symbol separating them, but can't for the life of me figure out how to import a file and put the proper data in the proper box or reformat the way it's separated

推荐答案

您可以使用 String.Split方法(系统)| Microsoft Docs [ ^ ]将三个部分分开。您可能需要进行初步检查以查看正在使用的控制字符。
You can use the String.Split Method (System) | Microsoft Docs[^] to separate the three parts. You may need an initial check to see which control characters are being used.


这篇关于列表格式转换器帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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