private static TryParseSection ( string line, string §ionName ) : bool | ||
line | string | |
sectionName | string | |
return | bool |
private static bool TryParseSection(string line, out string sectionName)
{
if (line != null)
{
line = line.Trim();
if (line.StartsWith(sectionNamePrefix, StringComparison.Ordinal)
&& line.EndsWith(sectionNameSuffix, StringComparison.Ordinal))
{
sectionName = line.Substring(1, line.Length - 2).Trim();
return true;
}
}
sectionName = null;
return false;
}