1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Update TypeExtensions.cs

Added xml comment on IsCastableFrom
This commit is contained in:
Raistlin Wolfe 2022-09-12 18:43:28 -06:00 committed by GitHub
parent 5e3c5c0012
commit ba988f7f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ using System.Reflection;
public static class TypeExtensions public static class TypeExtensions
{ {
/// <summary> Determines whether an instance of a specified type can be assigned to a variable of the current type. </summary>
public static bool IsCastableFrom(this Type to, Type from) public static bool IsCastableFrom(this Type to, Type from)
{ {
if ( to.IsAssignableFrom ( from ) ) if ( to.IsAssignableFrom ( from ) )