From: mickieparis on
The type or namespace name 'ListItem' could not be found (are you
missing a using directive or an assembly reference?)
From: Family Tree Mike on
On 4/27/2010 7:51 PM, mickieparis wrote:
> I started a new winforms project and suddenly I'm getting the error:
>
> The type or namespace name 'ListItem' could not be found (are you
> missing a using directive or an assembly reference?)
>
> Do I need to add a special reference? I don't remember having to do
> this before. Thanks
>
> Michelle

What is the line of code that gives the error?

I am only familiar with a ListItem in an ASP.Net app. You really are
using it in a windows forms app?

--
Mike
From: Arto Viitanen on
28.4.2010 3:14, Family Tree Mike wrote:
> On 4/27/2010 7:51 PM, mickieparis wrote:
>> I started a new winforms project and suddenly I'm getting the error:
>>
>> The type or namespace name 'ListItem' could not be found (are you
>> missing a using directive or an assembly reference?)
>>
>> Do I need to add a special reference? I don't remember having to do
>> this before. Thanks
>>
>> Michelle
>
> What is the line of code that gives the error?
>
> I am only familiar with a ListItem in an ASP.Net app. You really are
> using it in a windows forms app?
>

Another ListItem seems to be on System.Windows.Documents, i.e. a WPF
class. The name ListItem sounds like a property to me. Could you show
some code where it is used?

--
Arto Viitanen
From: Jeff Johnson on
"mickieparis" <mickieparis(a)gmail.com> wrote in message
news:b17282cc-9345-4d74-9125-211656cad419(a)x5g2000vbf.googlegroups.com...

> The type or namespace name 'ListItem' could not be found (are you
> missing a using directive or an assembly reference?)

System.Windows.Forms has a ListViewItem class, but not a ListItem class. The
list box's Items collection (a ListBox.ObjectCollection instance) holds
objects, not a strongly-typed class.

Like the other posters have said, it looks like you're mixing up a couple of
different project types. A standard "WinForms project" will not have a
ListItem class.