def fn(flag): a = ArrayList() a.Add(None) if flag: obj = cliupcast(a, System.Object) else: obj = box(42) b = clidowncast(obj, ArrayList) return b.get_Item(0)
def get_cliobj(self): return dotnet.cliupcast(self.holder, System.Object)