Solved

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

Posted on 2006-11-28
3
2,450 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 143

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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