string? relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath;
if (!string.IsNullOrEmpty(relativeSearchPath))
{
- string[] probingPaths = relativeSearchPath.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
+ string[] probingPaths = relativeSearchPath.Split(';', StringSplitOptions.RemoveEmptyEntries);
foreach (var probingPath in probingPaths)
{
var path = Path.Combine(location, probingPath);
}
char sep = culture.TextInfo.ListSeparator[0];
- string[] tokens = text.Split(new char[] { sep });
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
TypeConverter intConverter = TypeDescriptor.GetConverter(typeof(int));
for (int i = 0; i < values.Length; i++)
IndexField[] indexDesc = Array.Empty<IndexField>();
if ((null != sortString) && (0 < sortString.Length))
{
- string[] split = sortString.Split(new char[] { ',' });
+ string[] split = sortString.Split(',');
indexDesc = new IndexField[split.Length];
for (int i = 0; i < split.Length; i++)
// Nope. Parse the RGBA from the text.
//
if (obj == null) {
- string[] tokens = text.Split(new char[] {sep});
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
for (int i = 0; i < values.Length; i++) {
values[i] = unchecked((int)intConverter.ConvertFromString(context, culture, tokens[i]));
culture = CultureInfo.CurrentCulture;
}
char sep = culture.TextInfo.ListSeparator[0];
- string[] tokens = text.Split(new char[] {sep});
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
TypeConverter intConverter = TypeDescriptor.GetConverter(typeof(int));
for (int i = 0; i < values.Length; i++) {
culture = CultureInfo.CurrentCulture;
}
char sep = culture.TextInfo.ListSeparator[0];
- string[] tokens = text.Split(new char[] {sep});
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
TypeConverter intConverter = TypeDescriptor.GetConverter(typeof(int));
for (int i = 0; i < values.Length; i++) {
culture = CultureInfo.CurrentCulture;
}
char sep = culture.TextInfo.ListSeparator[0];
- string[] tokens = text.Split(new char[] {sep});
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
TypeConverter intConverter = TypeDescriptor.GetConverter(typeof(int));
for (int i = 0; i < values.Length; i++) {
// here, we know that the client has specified something, it's not empty
// and the server has specified exactly one protocol
- string[] requestProtocols = clientSecWebSocketProtocol.Split(new char[] { ',' },
- StringSplitOptions.RemoveEmptyEntries);
+ string[] requestProtocols = clientSecWebSocketProtocol.Split(',', StringSplitOptions.RemoveEmptyEntries);
acceptProtocol = subProtocol;
// client specified protocols, serverOptions has exactly 1 non-empty entry. Check that
/// </summary>
private long GetContentLengthFrom213Response(string responseString)
{
- string[] parsedList = responseString.Split(new char[] { ' ' });
+ string[] parsedList = responseString.Split(' ');
if (parsedList.Length < 2)
throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString));
return Convert.ToInt64(parsedList[1], NumberFormatInfo.InvariantInfo);
// addressInfo will contain a string of format "|||<tcp-port>|"
string addressInfo = responseString.Substring(pos1 + 1, pos2 - pos1 - 1);
- string[] parsedList = addressInfo.Split(new char[] { '|' });
+ string[] parsedList = addressInfo.Split('|');
if (parsedList.Length < 4)
throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString));
string ns = t.Namespace;
if (ns != null && ns.Length > 0)
{
- string[] parts = ns.Split(new char[] { '.' });
+ string[] parts = ns.Split('.');
for (int i = 0; i < parts.Length; i++)
{
EscapeKeywords(parts[i], sb);
return FromXmlNmToken(nmTokens);
else
{
- string[] toks = nmTokens.Split(new char[] { ' ' });
+ string[] toks = nmTokens.Split(' ');
StringBuilder sb = new StringBuilder();
for (int i = 0; i < toks.Length; i++)
{
culture = CultureInfo.CurrentCulture;
}
char sep = culture.TextInfo.ListSeparator[0];
- string[] tokens = text.Split(new char[] { sep });
+ string[] tokens = text.Split(sep);
int[] values = new int[tokens.Length];
TypeConverter intConverter = TypeDescriptor.GetConverter(typeof(int));
for (int i = 0; i < values.Length; i++)