Why am I getting this error: not all code paths return a value?

前端 未结 5 1580
长发绾君心
长发绾君心 2021-01-16 21:15

hi im new to c# and was trying to code but getting error can anybody help me with this what am i doing wrong?

using System;
using System.Collections.Generic         


        
5条回答
  •  粉色の甜心
    2021-01-16 22:01

    For this problem you have to use void if your function didn't return any value otherwise you have to define a return value at the end of your function.

提交回复
热议问题