Solved

stringbuilder problem

Posted on 2006-11-04
2
224 Views
Last Modified: 2010-04-16
Hi

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

thanks
andrea
0
Comment
Question by:andieje
2 Comments
 
LVL 142

Accepted Solution

by:
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(userID.ToString());

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

Author Comment

by:andieje
ID: 17874127
that will teach me - vb.net puts the brackets it - it's made me lazy!
0

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