© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
20 replies
Scott hrot

how to format multiple conditions assignments in return statement [CLOSED] [Answered]

Greetings, I was wondering, how could I properly format this piece of code.
return
  res > PageCount ?
    -1
    :
    isLastPage ?
      resint > PageItemCount(ItemCount / ItemsPerPage) ?
        -1
        :
        resint
      : resint;
return
  res > PageCount ?
    -1
    :
    isLastPage ?
      resint > PageItemCount(ItemCount / ItemsPerPage) ?
        -1
        :
        resint
      : resint;

You can see I tried to format it somehow, but I don't think it looks good. :D
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to return multiple variables?
C#CC# / help
3y ago
How to block a website in csharp? [Closed] [Answered]
C#CC# / help
4y ago
How can i simplify multiple conditions?
C#CC# / help
2y ago