这是android的java代码。我正在尝试将其转换为 windows c#。我尝试使用 split 但我不知道如何转到下一个元素。
StringTokenizer st = new StringTokenizer(source, "><");
String marker = st.nextToken();
while(st.hasMoreTokens())
{
nameLoop:
if(marker.equals("Name:"))
{
while(st.hasMoreTokens())
{
(marker.equals("strong"))
{
marker = st.nextToken();
while(!(marker.equals("/strong")))
{
Name = marker;
marker = st.nextToken();
}
break nameLoop;
}
marker = st.nextToken();
}
}
else
marker = st.nextToken();
}