Solved

stringbuilder problem

Posted on 2006-11-04
2
223 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

23 Experts available now in Live!

Get 1:1 Help Now