The jQueryPosition class in Script# is sealed and has got a private constructor. Its 2 properties (Left and Top) are also read-only.
What is the correct way of creating a new instance of jQueryPosition to be used with Offset() and other similar methods?
The only way I see now is to create a JSON string and then to convert it into the object, which is somewhat unsightly way of modifying a single property.
You could either download the Script# assembly source here and modify the
jQueryPositiontype yourself.Or you can create a new type with casts wrapped up in some helper methods. For instance: