Advertisement

10.11.2007 at 09:47PM PDT, ID: 22888863
[x]
Attachment Details

Cannot convert from 'string' to 'System.Collections.Generic.List<string>'

Asked by dba123 in C# Programming Language

Tags: , , ,

I can't figure out why it's complaining  I must be passing the generic list wrong or something

I have in my class this:

        static void Main(string[] args)
        {
            List<string> rightToCheck = null;
            rightToCheck.Add("Delete");

            UAuthorizationProvider provider = new UAuthorizationProvider();
            IPrincipal principal;

            provider.Authorize(principal, rightToCheck);
        }

cannot convert from 'string' to 'System.Collections.Generic.List<string>'

My Authorize method is declared like this:

        public bool Authorize(IPrincipal principal, List<string> rightsRequested)
        {
             ...
         }Start Free Trial
[+][-]10.11.2007 at 09:55PM PDT, ID: 20063144

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 09:55PM PDT, ID: 20063145

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 09:55PM PDT, ID: 20063146

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 09:58PM PDT, ID: 20063154

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 09:58PM PDT, ID: 20063157

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 10:01PM PDT, ID: 20063166

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 10:09PM PDT, ID: 20063180

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 10:11PM PDT, ID: 20063182

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.12.2007 at 12:42AM PDT, ID: 20063570

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Tags: convert, cannot, from, string
Sign Up Now!
Solution Provided By: Kelmen
Participating Experts: 4
Solution Grade: A
 
 
[+][-]10.12.2007 at 04:06AM PDT, ID: 20064310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628