Class TypeExtensions
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Provides extension methods for common types.
public static class TypeExtensions
- Inheritance
-
TypeExtensions
- Inherited Members
Methods
AddRangeUnique<T>(List<T>, List<T>)
Adds a range of items to the list if they are not already present.
public static void AddRangeUnique<T>(this List<T> dstList, List<T> list)
Parameters
Type Parameters
T
The type of the items in the list.
AddUnique<T>(List<T>, T)
Adds an item to the list if it is not already present.
public static void AddUnique<T>(this List<T> list, T item)
Parameters
list
List<T>The list to add the item to.
item
TThe item to add to the list.
Type Parameters
T
The type of the items in the list.
ToColor(Color)
Takes a System.Drawing.Color and converts it to a Xna.Framework.Color.
public static Color ToColor(this Color color)
Parameters
color
ColorThe color to convert.
Returns
- Color
The converted color.
ToVector3(Color)
Takes a System.Drawing.Color and converts it to a Vector3.
public static Vector3 ToVector3(this Color color)
Parameters
color
ColorThe color to convert.