Can I set the sorted property true/false in code or is it only available in properties?

I've tried ListBox.Sorted = True and it says it's a read only property.