[英]What is the C# .NET Silverlight equivalent of componentsSeparatedByString in Objective-C?
What is the C# .NET Silverlight equivalent of componentsSeparatedByString in Objective-C? 什么是Objective-C中的ComponentsSeparatedByString的C#.NET Silverlight等效项?
Here is how the method works in Objective-C: 以下是该方法在Objective-C中的工作方式:
NSString *namesStr = @"John;Michael;Jason";
NSArray *namesArray = [namesStr componentsSeparatedByString:@";"];
Is there anything like this with C# .NET for a List? C#.NET是否有类似清单的内容?
您可以只使用string.Split
:
var names = namesStr.Split(';');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.