c# - 2 rich edit controls, same text -
i've put 2 rich edit controls, should display same text. so, when edit text in 1 of them, other should reflect changes. problem - don't want put code in text changed event:
control1.rfttext = control2.rtftext
because create new instance of string each time text edited.
is there way send same instance of string both of controls or there other solutions problem?
control1.rfttext
immutable string if want modify it, you'll have create new string.
using control1.rfttext = "my new string"
create new string , appoint rfttext
field said. if serious optimizing sort of value assignments, can create own implementation of derived rich edit class use sort of stringbuilder
logic, or may internally represent text char[] array , modify that, may turn out real challenge, decide wisely.
Comments
Post a Comment