Return multiple values to a method caller

前端 未结 26 2333
故里飘歌
故里飘歌 2020-11-21 21:57

I read the C++ version of this question but didn\'t really understand it.

Can someone please explain clearly if it can be done and how?

26条回答
  •  一整个雨季
    2020-11-21 22:52

    <--Return more statements like this you can --> 
    
    public (int,string,etc) Sample( int a, int b)  
    {
        //your code;
        return (a,b);  
    }
    

    You can receive code like

    (c,d,etc) = Sample( 1,2);
    

    I hope it works.

提交回复
热议问题