stringbuilder problem

Posted on 2006-11-04
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
LVL 142

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Installing IIS after Visual Studio 2015 Community Edition 5 46
install app on other machine 13 32
Not showing JavaScript in the list 5 36
Error in JQuery 5 37
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now