在
Python中我可以写
@H_301_2@def myMethod():
#some work to find the row and col
return (row,col)
row,col = myMethod()
mylist[row][col] # do work on this element
但是在C#中,我发现自己写出来
@H_301_2@int[] MyMethod() { // some work to find row and col return new int[] { row,col } } int[] coords = MyMethod(); mylist[coords[0]][coords[1]] //do work on this elementPythonic方式是非常清洁.有没有办法在C#中做到这一点?