从Split中分配变量

时间:2009-06-28 02:03:57

标签: vb.net split

好的,所以我有这个字符串,它是“x / y”。如何使用split函数去除/并将x赋值给myVariable并将y赋值给myVariable2

1 个答案:

答案 0 :(得分:2)

dim MyVariable as string = xystring.split("/")(0)
dim MyVariable2 as string = xystring.split("/")(1)