mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Update ObjectExtension.cs
This commit is contained in:
@@ -16,9 +16,13 @@ internal static class ObjectExtension
|
||||
/// <typeparam name="T">数据类型</typeparam>
|
||||
/// <param name="source">源</param>
|
||||
/// <returns>数组</returns>
|
||||
[Obsolete("Use C# 12 Collection Literals")]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T[] ToArray<T>(this T source)
|
||||
{
|
||||
// TODO: use C# 12 collection literals
|
||||
// [ source ]
|
||||
// and mark this as Obsolete
|
||||
return new[] { source };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user