Solved

Operator '&&' cannot be applied to operands of type 'bool' and 'method group'

Posted on 2006-11-28
3
2,426 Views
Last Modified: 2011-04-14
Not sure what I'm doing wrong here and is there a better way to code the method?  (FYI: I used sss to hide the real names here for privacy purposes)

                if (chkSubmit.Checked && CheckRequiredSSS)
                {
                     ...do something
                 }

    protected bool CheckRequiredSSS()
    {
        if (sss.DataTier.sss.ContentItemType.Values.ssss != null)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

Error: Operator '&&' cannot be applied to operands of type 'bool' and 'method group'
0
Comment
Question by:dba123
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18031064
               if (chkSubmit.Checked == true && CheckRequiredSSS == true)
0
 
LVL 1

Author Comment

by:dba123
ID: 18031083
whoops, here's the resolution, duh

if (chkSubmit.Checked && CheckRequiredSSS())
0
 
LVL 1

Author Comment

by:dba123
ID: 18031087
or yours works also...
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question