Created
June 19, 2020 05:25
-
-
Save chuongmep/1a47b5819f22cb8327354f1931d8b05c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Parameter GetElemParam(Element elem, string name) | |
{ | |
return GetElemParam(elem, name, false); | |
} | |
public static Parameter GetElemParam(Element elem, string name, bool matchCase) | |
{ | |
StringComparison comp = StringComparison.CurrentCultureIgnoreCase; | |
if (matchCase) comp = StringComparison.CurrentCulture; | |
foreach (Parameter p in elem.Parameters) | |
{ | |
if (p.Definition.Name.Equals(name, comp)) return p; | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment