If you want ordrer it alphabetically with nullable values just use linq OrderBy function. If you want do this in multiple places write extension method with type argument TAClass:AClass. If you want some custom order implement in base class A ISortable (.net sorting interface i dont remember its name) interface with you custom sorting logic.
I have a textbox having textmode 'multiline' in which one can write source code, so my requirement is to make some part of textbox text to be read only and some part to be editable.....Suppose in a textbox there is 1 to 10 line(no of rows)... so i want row no.1 to row no.3 to be raedonly means no one can edit these rows, next row no.4 to row no.7 to be editable, and again row no.8 to row no.10 to read only.
How to achieve the above requirement... ??
I'll make the assumption that any line which can be edited cannot be broken into multiple lines...
As somebody else mentioned, it would be much easier to use another control, such as a grid view (or repeater), to split each line into its own control. That will allow you, for example, to more clearly indicate which lines are editable and which are read only (e.g., by graying out the read only lines).
I would say better would be using one from tone of JS libs, and RegExp on server but it's just my opinion.
Also if customer would allow this with his browsers HTML5 masked textbox would be good solution to.