Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-7082 Update List.cs => IndexOf #15268

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Libraries/CoreNodes/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,13 @@
/// </summary>
/// <param name="list">The list to find the element in.</param>
/// <param name="element">The element whose index is to be returned.</param>
/// <returns name="int">The index of the element in the list. Invalid index -1 will be returned if strict match not found.</returns>
/// <returns name="int">The index of the element in the list. Invalid index null will be returned if strict match not found.</returns>
/// <search>index,indexof</search>
[IsVisibleInDynamoLibrary(true)]
public static int IndexOf(IList list, object element)
{
return list.IndexOf(element);
var index = list.IndexOf(element);
return index < 0 ? null : index;

Check failure on line 174 in src/Libraries/CoreNodes/List.cs

View workflow job for this annotation

GitHub Actions / analyze

Cannot convert null to 'int' because it is a non-nullable value type
}

/// <summary>
Expand Down
Loading