2
Answers

Read Only Error

Ryan Turney

Ryan Turney

16y
7.8k
1

Hello everyone, I have run into an error I have never seen before and I am unsure on how to resolve this.

richtextbox.SelectionFont.Size = 5f; //This causes the error, just trying to define a font size.

Property or indexer 'System.Drawing.Font.Size' cannot be assigned to -- it is read only

Anyone have any idea on how to fix this? What is the point of having access to a value and then being restricted from changing it?

Thank you,
Ryan

Answers (2)