Skip to content

Commit

Permalink
Renamed first.
Browse files Browse the repository at this point in the history
  • Loading branch information
tacosontitan committed Apr 11, 2024
1 parent a2f2c41 commit 6d2ba2d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Hussy.Net/Linq/First/BasicFirst.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Hussy.Net;

public static partial class Hussy
{
/// <summary>
/// Gets the first element of the source collection.
/// </summary>
/// <param name="source">The source collection to get the first element from.</param>
/// <typeparam name="T">Specifies the type of data within the collection.</typeparam>
/// <returns>
/// The first element in the source collection if elements are present;
/// otherwise the default value for <typeparamref name="T"/>.
/// </returns>
public static T? Fe<T>(this IEnumerable<T> source) =>
source.FirstOrDefault();
}

0 comments on commit 6d2ba2d

Please sign in to comment.