none
Cannot implicitly convert type 'System.Data.Linq.Binary[]' to 'byte[]' RRS feed

  • Question

  • Hi Friends,
       I wants to display image in mvc application, when I write following code then “Cannot implicitly convert type 'System.Data.Linq.Binary[]' to 'byte[]' “ error occurred.
    Now how to solved this error.

    MemberInfo agentobj = (MemberInfo)obj;

    foreach(Users in resObj)

                    {

                        agentobj.CompanyLogo = rs.CompanyLogo.ToArray();

    }

                       



    Tuesday, November 27, 2012 10:36 AM

Answers

  • Hi Rakesh,

    Welcome to the MSDN Forum.

    How about :

     agentobj.CompanyLogo = rs.CompanyLogo[0].ToArray();
    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 28, 2012 9:27 AM
    Moderator

All replies

  • Hi Rakesh,

    Welcome to the MSDN Forum.

    How about :

     agentobj.CompanyLogo = rs.CompanyLogo[0].ToArray();
    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 28, 2012 9:27 AM
    Moderator
  • Hi Mike,

    Thanks for your reply.Now am solved this error .I got this error when I debug m application , the error is companyLogo comes to null.so modified the code tested and run perfectly.

    Regards,

    Rakesh

    Tuesday, January 8, 2013 4:55 AM