简体   繁体   English

当我看到 ; 时,我想拆分列表中的数据; 在 C# 中

[英]I want to split the data in the list when i see the ; in C#

在此处输入图片说明

I need to split this data in the box to and add it to new line when it see the ";"我需要将框中的这些数据拆分为,并在看到“;”时将其添加到新行

var retryParamInfo = new ExParamsContent 
{ 
    Idenitifier = tempIdentifier.SerialNumber, 
    Name = String.Format( "Retry Information Console {0}",i), 
    Value = MyTestRunGlobals.FixtureComponents[i].Uuts[0].RetryList, 
    //Value = thisUut.RetryList.Replace("\n", "\n" + Environment.NewLine), 
}; 
uutTempInfo.ExParams.Add(retryParamInfo);

To split a string when some character occours, you can use:要在出现某些字符时拆分字符串,您可以使用:

myString.split(';');

and make the result of this be inside a array.并使这个结果在一个数组中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想将 c# 列表转换为 JArray - I want to convert a c# list into a JArray 我想将XML Like字符串拆分为c#或sql中的标记 - I want to split a XML Like string to tokens in c# or sql 如何从拆分结果 c# 中获取我想要的字符串 - How to get the string i want from split result c# C# - 在查看基本实例列表时,如何查看某个实例的子类? - C# - How do I see what subclass a certain instance is when looking through a list of base instances? 如何检查C#中是否存在列表索引? - How do I check to see if a list index exists in C#? 有没有可能看到我在C#WPF中按下数据网格上的向下箭头时如何将事件绑定到该事件? - is it possible to see when I press the down arrow on a Data Grid in C# WPF how to tie a event to that? sqlServer问题:当我想在C#中的表中输入数据时,数据未在其中注册。 没有异常抛出 - sqlServer prob: When i want to enter data in a table in c#, the data are not registered in it. No exception thrown 如何在C#中根据索引拆分列表? - How do I split a list based on index in C#? 如何拆分字符串并将其放入WebMatrix的C#列表中? - How can I split a string and put it into a C# List in WebMatrix? 我想在客户端使用 TCP/IP 在 C# 中向服务器发送请求时发送一​​些数据和图像 - I want to send some data and image when client send request to server in c# using TCP/IP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM