C# Terinary Opperator

PHOTO EMBED

Tue Jun 28 2022 13:20:05 GMT+0000 (Coordinated Universal Time)

Saved by @Marcos_ #c#

return value?.Length > maxLength ? value.Substring(0, maxLength) : value;
content_copyCOPY

based on the outcome of the value?.Length > maxLength, the terinary will either return value.Sustring(0, maxLength) when true or value when false.