Click here to Skip to main content
15,889,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: Adding your own toolbox controls to the IDE and linking up their events... Pin
N a v a n e e t h3-Mar-11 13:54
N a v a n e e t h3-Mar-11 13:54 
QuestionAdding a socket to application Pin
Bob Pawley3-Mar-11 12:14
Bob Pawley3-Mar-11 12:14 
AnswerRe: Adding a socket to application Pin
N a v a n e e t h3-Mar-11 13:44
N a v a n e e t h3-Mar-11 13:44 
AnswerRe: Adding a socket to application Pin
Groulien3-Mar-11 23:43
Groulien3-Mar-11 23:43 
Questioncan anyone help me with this code complilation Pin
rickysharp3-Mar-11 9:53
rickysharp3-Mar-11 9:53 
AnswerRe: can anyone help me with this code complilation Pin
Pete O'Hanlon3-Mar-11 9:58
mvePete O'Hanlon3-Mar-11 9:58 
AnswerRe: can anyone help me with this code complilation Pin
Luc Pattyn3-Mar-11 10:02
sitebuilderLuc Pattyn3-Mar-11 10:02 
AnswerRe: can anyone help me with this code complilation Pin
OriginalGriff3-Mar-11 21:49
mveOriginalGriff3-Mar-11 21:49 
Pete and Luc both raise valid points.
How to fix them:
1) When you post a code fragment, use the "code block" widget to put <pre> and </pre> tags around it: this preserves the indentation and formatting and makes it a lot easier to read!
2) As Luc said, you do need to balance all "matched pairs": every '(' must have it's ')', every '{' must have it's '}', and so on:
using System;

namespace ConsoleApplication1
   {
   class Program
      {
      static void Main(string[] args)
         {
         Console.Write("wellcome to");
         Console.Write(" " + args[0]);
         Console.WriteLine(" " + args[1]);
         }
      }
   }
Your program should now compile cleanly.
3) You also need (as Pete said) to check your inputs: what if you didn't provide any command line parameters?
using System;

namespace ConsoleApplication1
   {
   class Program
      {
      static void Main(string[] args)
         {
         if (args.Length >= 2)
            {
            Console.Write("wellcome to");
            Console.Write(" " + args[0]);
            Console.WriteLine(" " + args[1]);
            }
         else
            {
            Console.WriteLine("Usage: ConsoleApplication1 YourName");
            }
         }
      }
   }

Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

QuestionMove Email Pin
MWRivera3-Mar-11 9:02
MWRivera3-Mar-11 9:02 
AnswerRe: Move Email Pin
Pete O'Hanlon3-Mar-11 9:31
mvePete O'Hanlon3-Mar-11 9:31 
GeneralRe: Move Email Pin
MWRivera3-Mar-11 10:09
MWRivera3-Mar-11 10:09 
GeneralRe: Move Email Pin
Pete O'Hanlon3-Mar-11 11:32
mvePete O'Hanlon3-Mar-11 11:32 
GeneralRe: Move Email Pin
MWRivera3-Mar-11 11:44
MWRivera3-Mar-11 11:44 
GeneralRe: Move Email Pin
Pete O'Hanlon3-Mar-11 21:36
mvePete O'Hanlon3-Mar-11 21:36 
GeneralRe: Move Email Pin
MWRivera7-Mar-11 9:40
MWRivera7-Mar-11 9:40 
QuestionC# Pin
Karo1113-Mar-11 8:24
Karo1113-Mar-11 8:24 
AnswerRe: C# Pin
OriginalGriff3-Mar-11 9:06
mveOriginalGriff3-Mar-11 9:06 
GeneralRe: C# Pin
Pravin Patil, Mumbai4-Mar-11 0:06
Pravin Patil, Mumbai4-Mar-11 0:06 
QuestionMake window dock/undock to parent window Pin
manchukuo3-Mar-11 8:18
manchukuo3-Mar-11 8:18 
QuestionIs there a way to search through all buttons of a window handle? Pin
turbosupramk33-Mar-11 6:14
turbosupramk33-Mar-11 6:14 
AnswerRe: Is there a way to search through all buttons of a window handle? Pin
SledgeHammer013-Mar-11 6:23
SledgeHammer013-Mar-11 6:23 
GeneralRe: Is there a way to search through all buttons of a window handle? Pin
turbosupramk33-Mar-11 6:52
turbosupramk33-Mar-11 6:52 
GeneralRe: Is there a way to search through all buttons of a window handle? Pin
SledgeHammer013-Mar-11 8:11
SledgeHammer013-Mar-11 8:11 
GeneralRe: Is there a way to search through all buttons of a window handle? Pin
turbosupramk33-Mar-11 8:30
turbosupramk33-Mar-11 8:30 
GeneralRe: Is there a way to search through all buttons of a window handle? Pin
SledgeHammer013-Mar-11 9:42
SledgeHammer013-Mar-11 9:42 

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.