Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is there a way to wrap a file into my dll and then copy it out to a directory during an event? Pin
Richard MacCutchan12-Jan-12 21:43
mveRichard MacCutchan12-Jan-12 21:43 
GeneralRe: Is there a way to wrap a file into my dll and then copy it out to a directory during an event? Pin
BobJanova12-Jan-12 23:29
BobJanova12-Jan-12 23:29 
AnswerRe: Is there a way to wrap a file into my dll and then copy it out to a directory during an event? Pin
jschell14-Jan-12 6:45
jschell14-Jan-12 6:45 
QuestionSerial port Windows 8 WinRT Pin
Member 834721012-Jan-12 2:54
Member 834721012-Jan-12 2:54 
QuestionHow to do image closing for ABBYY Finereader Engine 10 Pin
YongSiang11-Jan-12 14:55
YongSiang11-Jan-12 14:55 
AnswerRe: How to do image closing for ABBYY Finereader Engine 10 Pin
Pete O'Hanlon11-Jan-12 21:18
mvePete O'Hanlon11-Jan-12 21:18 
QuestionC# COM object and PowerBuilder Pin
TimWallace11-Jan-12 10:54
TimWallace11-Jan-12 10:54 
QuestionC#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain10-Jan-12 19:16
Deborah Palmer McCain10-Jan-12 19:16 
As I am new at this, and this is my first attempt at actually writing code, some of you may chuckle (or laugh out loud at the simplistic code)... please be merciful.

I keep getting the error message: A namespace cannot directly contain members such as fields or methods"

I have visited MSDN, and virtually every google and bing hit out there, but no matter how I change the first entry, I get the same message. Could someone help?

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

namespace _11012_debproject_2
{

    class Program

    {
        static void Main(string[] args);





          int number1;
          int number2;
          int Multiply;



     // prompt user
     // enter first number
}


              Console.WriteLine( "Enter first number:" )
              number1 (Console.Readline());
     // prompt user
     // enter second number

              Console.WriteLine( "Enter second number:")
              number2 ( Console.ReadLine());

              product = number1 * number2;

     // multiply numbers

           Console.WriteLine( "product is {0}",product );
}
    // display product} }

AnswerRe: C#_Error "Namespace cannot directly contain..." Pin
Roger Wright10-Jan-12 19:37
professionalRoger Wright10-Jan-12 19:37 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:43
Deborah Palmer McCain11-Jan-12 5:43 
AnswerRe: C#_Error "Namespace cannot directly contain..." Pin
rajeevcapgeminiindia10-Jan-12 19:53
rajeevcapgeminiindia10-Jan-12 19:53 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:44
Deborah Palmer McCain11-Jan-12 5:44 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 6:39
Deborah Palmer McCain11-Jan-12 6:39 
AnswerRe: C#_Error "Namespace cannot directly contain..." Pin
RobCroll10-Jan-12 19:53
RobCroll10-Jan-12 19:53 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:50
Deborah Palmer McCain11-Jan-12 5:50 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Roger Wright11-Jan-12 18:18
professionalRoger Wright11-Jan-12 18:18 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain12-Jan-12 5:57
Deborah Palmer McCain12-Jan-12 5:57 
AnswerRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff10-Jan-12 22:19
mveOriginalGriff10-Jan-12 22:19 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:55
Deborah Palmer McCain11-Jan-12 5:55 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
killabyte11-Jan-12 16:49
killabyte11-Jan-12 16:49 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff11-Jan-12 21:40
mveOriginalGriff11-Jan-12 21:40 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
BillWoodruff12-Jan-12 16:12
professionalBillWoodruff12-Jan-12 16:12 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff12-Jan-12 21:08
mveOriginalGriff12-Jan-12 21:08 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
BobJanova12-Jan-12 23:33
BobJanova12-Jan-12 23:33 
QuestionGamebot / find images on grid / scrabulizer etc Pin
LordNeverwinter10-Jan-12 7:38
LordNeverwinter10-Jan-12 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.