LINQ: How to use .First instead of {0}

Hello,

I have a log message:
String.Format(“API Response code: {0}. Order {1} will be retried. Retry count {2}”,intStatus, strOrderNr, intRetryCounter)
Item “0” doesn not exist, I would like to use .First element instead of “0”.
How I can do this?
What to do to use first element?

currently we cannot derrive on where you want retrieve the first element. Maybe you can share some more details with us.

Also have a look here:
YourVar.First()

Hi @aleksandra.plichta5

Can you try this:

String.Format("API Response code: {0}. Order {1} will be retried. Retry count {2}", intStatus, strOrderNr, intRetryCounter.First())

Hope this helps,
Best Regards.