© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
2 replies
Triufelis

? syntax [Answered]

public void Add(T newItem)
{
var insertAt = _Inner.Count == 0 ? 0 : new Random().Next(0,_Inner.Count+1);
_Inner.Insert(insertAt, newItem);
}
What does the ? mean in this code?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

syntax errors
C#CC# / help
5mo ago