Show / Hide Table of Contents

Class TypeExtensions

Extension methods for Type.

Inheritance
object
TypeExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Core.dll
Syntax
public static class TypeExtensions

Methods

View Source

GetNameWithoutGenerics(Type)

Gets the type's name without any generic type suffix indicated by a backtick.

Declaration
public static string GetNameWithoutGenerics(this Type self)
Parameters
Type Name Description
Type self

The type being extended.

Returns
Type Description
string

A string.

View Source

GetPropertyOrField(Type, string, BindingFlags)

Gets the property with the given name, or if it doesn't exist, the field.

Declaration
public static MemberInfo? GetPropertyOrField(this Type self, string parameterName, BindingFlags flags)
Parameters
Type Name Description
Type self

The type being extended.

string parameterName

The property or field name.

BindingFlags flags

The member's binding flags.

Returns
Type Description
MemberInfo

The property or field, if found, or else null.

  • View Source
In this article
Back to top Generated by DocFX