Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


stringbuilder problem

Posted on 2006-11-04
Medium Priority
Last Modified: 2010-04-16

I have this code

  public static Collection<RequestView> GetOpenRequests(Guid userID)
            StringBuilder s = new StringBuilder();
            s.Append("RequestorID = ");
            s.Append(userID.ToString); <-----

            s.Append(" AND StartDate >= ");
            s.Append(System.DateTime.Today.ToUniversalTime);  <-----
            s.Append(" AND RecorderID IS NULL");

but i'm getting this error on the highlighted lines
cannot convert from 'method group' to 'string'

i dont know what the problem is

Question by:andieje
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17873901
public static Collection<RequestView> GetOpenRequests(Guid userID)
            StringBuilder s = new StringBuilder();
            s.Append("RequestorID = ");

            s.Append(" AND StartDate >= ");
            s.Append(" AND RecorderID IS NULL");

Author Comment

ID: 17874127
that will teach me - puts the brackets it - it's made me lazy!

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

704 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