Visual c# -> library not fount??

Maby related problem:
When i try to compile a simple hallo word app i get:
AI.cs(6,5): error CS0117: 'System.Console' does not contain a definition for
'writeLine'
See atache for file that gives error

NeverMinde, Seems c# is case sensitive :(
 

Attachments

  • ai.cs
    ai.cs
    108 bytes · Views: 1
Last edited:
A good way to get used to that is to use the intellisense militantly -- when you use <object>. and the intellisense list pops up, find the item you want (by typing in whatever case you want, until the item shows in the list) and then press tab and it will automatically complete the word in the correct case. You can press control-space at any time you pop up the intellisense as well.
 
Ya, But in vc#.net in IDE it say console is not a valid member, but if i compile form cmd it works ??
Small question, -> how do i do process.stary("my.exe")?? in c#


greets
 
Same as VB... you may need to import the System.Diagnostics namespace, though: at the top of the code, but
C#:
using System.Diagnostics
Then the
C#:
Process.Start("moo.exe")
will work.
 
k thanx,
Can i hit you with some more questions?
i'm goint to port some vb.net program to c#(atleast i hope)
1. How do i make it start from somting simular to sub main? and then load a form or a trayicon?
2.I presume textstreams work the same?
3.Is controling the gui the smae like cmd1.hide()? but with a ending ;??

Thanx agen
 
The language concepts are almost all the same. And all C# programs start in sub main -- notice that in your main form, you probably have something like this:

C#:
static void Main() {
  Application.Run(new Form1());
}
You can put anything you want in there before the application really starts.
 
Many of the common namespaces are imported by default, but anything you're going to be using in your class alot, import it. You don't *have* to import anything, it just saves typing and readability.
 
Back
Top