System.TypeExtensions.ResultType C# (CSharp) 메소드

ResultType() 공개 정적인 메소드

public static ResultType ( this memberInfo ) : Type
memberInfo this
리턴 Type
		public static Type ResultType(this MemberInfo memberInfo)
		{
			var resultType = memberInfo.MaybeAs<PropertyInfo>().Select(x => x.PropertyType)
				.OrElse(() => memberInfo.MaybeAs<MethodInfo>().Select(x => x.ReturnType))
				.OrElse(() => memberInfo.MaybeAs<FieldInfo>().Select(x => x.FieldType)).Value;
			return resultType;
		}