开发者

i want to convert List<object> to ArrayList but not getting any output

here is my code...

[WebMethod]    
    public ArrayList GetDataByModuleName(strin开发者_Go百科g ModuleName)
    {
        ArrayList m = (ArrayList)BAL_GeneralService.GetDataByModuleName(ModuleName);
        return m;
    }

but not getting any output...


you want to use the constructor:

    public ArrayList GetDataByModuleName(string ModuleName)
    {
        ArrayList m = new ArrayList(BAL_GeneralService.GetDataByModuleName(ModuleName));
        return m;
    }


At a guess, the BAL_GeneralService.GetDataByModuleName does not return any results for the ModuleName you passed in.


Have you checked that BAL_GeneralService.GetDataByModuleName(ModuleName); is not returning a null?

Edit: Since its returning a List you need to pass it to the ArrayList constructor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜