我正在尝试做两件事:
我有一个文本文件 ( Books.txt
),我正在尝试创建一个应用程序来在ListBox
. 文本文件内容如下:
Left Behind,Lahaye,F,7,11.25
A Tale of Two Cities,Dickens,F,100,8.24
Hang a Thousand Trees with Ribbons,Rinaldi,F,30,16.79
Saffy's Angel,McKay,F,20,8.22
Each Little Bird that Sings,Wiles,F,10,7.70
Abiding in Christ,Murray,N,3,12.20
Bible Prophecy,Lahaye and Hindson,N,5,14.95
Captivating,Eldredge,N,12,16
Growing Deep in the Christian Life,Swindoll,N,11,19.95
Prayers that Heal the Heart,Virkler,N,4,12.00
Grow in Grace,Ferguson,N,3,11.95
The Good and Beautiful God,Smith,N,7,11.75
Victory Over the Darkness,Anderson,N,12,16
倒数第三个元素要么F
代表小说,要么N
代表非小说。我正在尝试将代码写入应用程序查看文本文件的位置,检查元素 3 是否为 anF
或 an N
,并仅在ListBox
.
我ListBox
的名为lstInventory
.