私は反射と拡張方法
IEnumerable<MethodInfo> foundMethods = from q in typeof(string).GetMethods()
where q.Name == "Contains"
select q;
foundMethodsしか含まれています(String)メソッド理由を得る反射による方法を取得するために
public static bool Contains(this string original, string value, StringComparison comparisionType)
{
return original.IndexOf(value, comparisionType) >= 0;
}
しかし、不可能な文字列クラスに拡張メソッドを持っていますか?他のメソッドはどこにありますか?
([拡張メソッドを識別するために、C#のリフレクション]の可能重複http://stackoverflow.com/questions/299515/c-sharp-reflection-to-identify:あなたは、コードを使用して取得することができ
-extension-methods) –
[Reflection to Identify Extension Methods]の可能な複製(http://stackoverflow.com/questions/299515/reflection-to-identify-extension-methods) –