如何循环获取平衡值 [英] how to looping for get balance value
本文介绍了如何循环获取平衡值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
COACode COAName DocNo DocDate OpenBal Debet Credit CloseBal
1000 Cash/Bank D003 4/4/2004 1000 100 0 1100
1000 Cash/Bank D001 5/5/2005 0 100 1000
1000 Kas/Bank D002 6/6/2006 100 0 1100
2000 AP D005 4/4/2004 2000 100 0 2100
2000 AP D004 5/5/2005 0 100 2000
如何在VS2005上使用循环获取CloseBal的值,例如上面的示例?
How i get the value of CloseBal like sample above using looping on VS2005?
推荐答案
假设你在文本文件中有这样的信息:
Assuming you have such information in a text file:
- 读取第一行并丢弃它
- 将下一行读入一个字符串(说
s
):如果没有可用的行,则退出循环 - 拆分字符串s(使用String.Split方法)并获取最后一个数组项
- 转到第2点
- read the first line and discard it
- read next line into a string (say
s
): if no line is available, then exit the loop - split the string s (using String.Split method) and get last array item
- goto point 2
这篇关于如何循环获取平衡值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文