Method should return multiple values

后端 未结 7 1128
执笔经年
执笔经年 2020-12-19 09:10

Hii

I have method in C#, I have to return multiple values from that method with out using collections like arrays. Is there any reliable way ?

7条回答
  •  长情又很酷
    2020-12-19 09:39

    public int Method Name(out string stringValue, out int intValue)
    {
        ///
              Method goes here
        ///
    
        return intVaraible
    }
    

    here you will get 3 return Values 1. stringValue 2. intValue 3. intVariable

提交回复
热议问题