List Info

Thread: The type or namespace name 'Item' could not be found (are you missing a us




The type or namespace name 'Item' could not be found (are you missing a us
country flaguser name
United States
2007-10-17 22:48:44

I am converting a email parser I made in VB.NET to C#... I am stuck on this
error:
The type or namespace name 'Item' could not be found (are you missing a
using directive or an assembly reference?

The for each line is giving the error and I tired it a couple different
ways.

string Item;

//foreach ( Item in Request.Form) {

foreach (Item Val in Request.Form)

Works in VB as:

Dim Item As String

For Each Item In Request.Form

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity
Visit Your Group
Y! Messenger

Instant hello

Chat over IM with

group members.

Fitness Challenge

on Yahoo! Groups

Get in shape w/the

Special K Challenge.

Yahoo! Groups

Join a yoga group

and take the stress

out of your life.

Re: The type or namespace name 'Item' could not be found (are you missing
country flaguser name
United States
2007-10-17 22:52:54

foreach (string Item in Request.Form)

Type is always the first part of the declaration in C#

On 10/17/07, mbelcher < AspNetAnyQuestionIsOk%40faroutcomputersystems.com">AspNetAnyQuestionIsOkfaroutcomputersystems.com>
wrote:
>
>; I am converting a email parser I made in VB.NET to C#... I am stuck on
> this
>; error:
&gt; The type or namespace name 'Item' could not be found (are you missing a
> using directive or an assembly reference?
>
&gt;
>
> The for each line is giving the error and I tired it a couple different
> ways.
&gt;
>
> string Item;
&gt;
>
>
>; //foreach ( Item in Request.Form) {
>
> foreach (Item Val in Request.Form)
>
>
&gt;
>
> Works in VB as:
>
> Dim Item As String
&gt;
>
>
&gt; For Each Item In Request.Form
>
>
>;
> [Non-text portions of this message have been removed]
>
>;
>
>
> Yahoo! Groups Links
&gt;
>
>
>;

--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )