For example, the
.Length() method operates on whatever object "calls" it (although call might not be the correct term here). This is true for any arbitrary object or array, be it
Obj.Length() or
this.Object[3,"foo","bar"].Length(). How do I bind a custom method/function in such a way that it behaves in a similar way? For my particular use-case, we can assume we are operating within a class, but the objects in question (and there may be hundreds) are not top-level objects (they are more like
this.Object[3,"foo","bar"]). Right now I am doing something like:
Code: Select all
this.Method(this.myvar[3,"foo","bar"])
Method(ByRef Obj){
; Perform some operation based on Obj, such as return the Length
}
But I am hoping instead to do this.myvar[3,"foo","bar"].Method()