V Гость
|
Добавлено: Ср Мар 20 2002 09:25 Заголовок сообщения: Не запускаются примеры по C# |
|
|
Пытаюсь запустить ряд примеров из статей, типа: using System;using System.WinForms;using System.Drawing;public class MyForm : Form{ public MyForm () { Text = "Windows Forms Demo"; } protected override void OnPaint (PaintEventArgs e) { e.Graphics.DrawString ("Hello, world", Font, new SolidBrush (Color.Black), ClientRectangle); } public static void Main (string[] args) { Application.Run (new MyForm ()); }} Запускаю: csc.exe /t:winexe 3.cs . Компилятор ругается, пишет: Microsoft (R) Visual C# Compiler Version 7.00.9030 [CLR version 1.00.2204.21]Copyright (C) Microsoft Corp 2000. All rights reserved.3.cs(2,14): error CS0234: The type or namespace name 'WinForms' does not exist in the class or namespace 'System'3.cs(3,14): error CS0234: The type or namespace name 'Drawing' does not exist in the class or namespace 'System'3.cs(5,23): error CS0234: The type or namespace name 'Form' does not exist in the class or namespace ''3.cs(12,3: error CS0234: The type or namespace name 'PaintEventArgs' does notexist in the class or namespace 'MyForm' И так со всеми примерами. Вроде ни в одной из статей не описано дополнительных действий по установке и запуску. |
|