List

  • Thread starter Thread starter AA2e72E
  • Start date Start date
Thanks for the response.
I have

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

followed by the function , which I copied and pasted.

I am getting an error:

Expected class, delegate, enum, interface, or struct

with the error pointing to the 2 occurences of the word List

I am missing something here. What is it?
 
AA2e72E said:
I have

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

followed by the function , which I copied and pasted.

I am getting an error:

Expected class, delegate, enum, interface, or struct

with the error pointing to the 2 occurences of the word List

I am missing something here. What is it?

If you pasted the function just below "using System.Text" then you are
missing a class declaration. The function needs to be declared inside a
class (or struct).
 
Sanity restored! Many thanks, Morten.

Morten Wennevik said:
AA2e72E said:
There is a function GetProductList here
http://msdn.microsoft.com/en-us/vcsharp/aa336753.aspx

What do I need to do to get the List?

Thanks for your help.

Hi,

The code sample appears to be incorrect. You can download the entire sample
project with including the LinqSamples.cs here:

[C# Samples for Visual Studio 2008]
http://code.msdn.microsoft.com/csharpsamples/Release/ProjectReleases.aspx?ReleaseId=8
 
Back
Top