// Get Strings
//
// Needs to be a certain length e_a_E_A at least (7 chars, exactly 4 groups)
- String[] names = data.Split(new char[] {'_'});
+ String[] names = data.Split('_');
// Should have exactly 4 parts
// 0 - Era Name
protected String[] m_expressionsArray;
protected bool m_throwOnRelative;
-
- protected static readonly char[] m_separators = { ';' };
+
+ private const char Separator = ';';
protected static readonly char[] m_trimChars = { ' ' };
#if !PLATFORM_UNIX
protected static readonly char m_directorySeparator = '\\';
if (m_expressions == null)
m_expressions = str;
else
- m_expressions = m_expressions + m_separators[0] + str;
+ m_expressions = m_expressions + Separator + str;
m_expressionsArray = null;
}
else
{
- return expressions.Split( m_separators );
+ return expressions.Split(Separator);
}
}
while (enumerator.MoveNext())
{
if (!first)
- sb.Append( m_separators[0] );
+ sb.Append(Separator);
else
first = false;
String currentString = (String)enumerator.Current;
if (currentString != null)
{
- int indexOfSeparator = currentString.IndexOf( m_separators[0] );
+ int indexOfSeparator = currentString.IndexOf(Separator);
if (indexOfSeparator != -1)
sb.Append( '\"' );
{
private bool m_checkForIllegalChars;
- private new static char[] m_separators = { '/' };
-
// From KB #Q177506, file/folder illegal characters are \ / : * ? " < > |
protected static char[] m_illegalDirectoryCharacters = { '\\', ':', '*', '?', '"', '<', '>', '|' };
Contract.EndContractBlock();
ArrayList list = new ArrayList();
- String[] separatedArray = directory.Split(m_separators);
+ String[] separatedArray = directory.Split('/');
for (int index = 0; index < separatedArray.Length; ++index)
{
[Serializable]
internal class LocalSiteString : SiteString
{
- private new static char[] m_separators = { '/' };
-
public LocalSiteString( String site )
{
m_site = site.Replace( '|', ':');
Contract.EndContractBlock();
ArrayList list = new ArrayList();
- String[] separatedArray = directory.Split(m_separators);
+ String[] separatedArray = directory.Split('/');
for (int index = 0; index < separatedArray.Length; ++index)
{
protected String m_site;
protected ArrayList m_separatedSite;
- protected static char[] m_separators = { '.' };
-
protected internal SiteString()
{
// Only call this in derived classes when you know what you're doing.
// Regular hostnames or IPv4 addresses
// We dont need to do this for IPv4 addresses, but it's easier to do it anyway
- String[] separatedArray = site.Split( m_separators );
+ String[] separatedArray = site.Split('.');
for (int index = separatedArray.Length-1; index > -1; --index)
{
// filePath = "C:\Windows\System32\tzres.dll"
// resourceId = -100
//
- string[] resources = resource.Split(',', StringSplitOptions.None);
+ string[] resources = resource.Split(',');
if (resources.Length != 2)
{
return string.Empty;
private readonly int _Minor;
private readonly int _Build = -1;
private readonly int _Revision = -1;
- private static readonly char[] SeparatorsArray = new char[] { '.' };
public Version(int major, int minor, int build, int revision) {
if (major < 0)
return false;
}
- String[] parsedComponents = version.Split(SeparatorsArray);
+ String[] parsedComponents = version.Split('.');
int parsedComponentsLength = parsedComponents.Length;
if ((parsedComponentsLength < 2) || (parsedComponentsLength > 4)) {
result.SetFailure(ParseFailureKind.ArgumentException);