C sharp programming tutorial
... and that the csc executable is included in your path Also make sure that path of C# Compiler (csc.exe) is correct After compiling your code, the C# compiler creates an exe file called first.exe ... static void Main() { Console.WriteLine("Hello, C# world!"); } } You can compile C# code from the command line using this syntax: csc C:\\temp\first.cs Make sure the path of your cs file is correct ... HelloWorldNamespace { class Hello { static void Main() { MyOtherClass cls = new MyOtherClass(); } } cls.Hello(); } // Called namespace namespace MyOtherNamespace { class MyOtherClass { public void Hello() { Console.WriteLine("Hello,
Ngày tải lên: 05/12/2016, 12:45
... methods // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create rectangles and regions Rectangle rect1 = new Rectangle(20, 20, 200, 200); Rectangle rect2 = ... a rectangle, excluding one small rectangle and a region. Listing 6.11 Using ExcludeClip to clip regions // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); ... click event handlers private void CircleMenu_Click(object sender, System.EventArgs e) { // Create a rectangle Rectangle rect = new Rectangle (50 , 0, 300, 300); // Create a Shape object and call
Ngày tải lên: 12/08/2014, 19:20
... 11.11 PaperSourceKind members Member Description AutomaticFeed Automatically fed paper Cassette A paper cassette Custom A printer-specific paper source Envelope... PrintDocument object handles printing ... PrintGraphicsItems_Click method is a menu click event handler that creates a PrintDocument object, sets its PrintPage event, and calls the Print method. The second method, PrintGraphicsItemsHandler, ... ViewImage_Click(object sender, System.EventArgs e) { // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Call OpenFileDialog, which allows us to browse // images OpenFileDialog
Ngày tải lên: 12/08/2014, 19:20
visual c-sharp programming basics
... going to work on the calculator project until we reach some control that we can’t use in such a project. ... Drag a check box on your form. Then double‐click on it to open the function that occurs when it’s check is ... We typed “public” before declaring the function so we can use it outside this class. Now, go back to “Form1.cs” and declare the class right on top of the Main function: Calculator Calc = new Calculator(); ... Drag a check box on your form. Then double‐click on it to open the function that occurs when it’s check is changed and type: private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { button1.Enabled = true; } else 18 VISUAL C# PROGRAMMING BASICS {
Ngày tải lên: 28/04/2014, 15:33
Ebook C sharp programming
... XML to PDF XSL-FO Formatter C Sharp Programming value C# Programming Cover | Introduction | Basics | Classes | The NET Framework | Advanced Topics | Index C sharp musical note The special identifier ... sharp musical note Advanced Inheritance Interfaces Abstract Classes Partial Classes Generics Object Lifetime - 26 - by , XML to PDF XSL-FO Formatter C Sharp Programming Index C# Programming ... Structure C# Programming Cover | Introduction | Basics | | The NET Framework | Advanced Topics | Index C sharp musical note Structure Namespaces Giving your code its own space to live in Classes
Ngày tải lên: 05/12/2016, 11:48
Packt programming windows workflow foundation practical WF techniques and examples using XAML and c sharp dec 2006 ISBN 1904811213 pdf
... Table of Contents The CompensatableTransactionScopeActivity The CompensateActivity Conditions and Rules The ConditionedActivityGroup The PolicyActivity Web Services The InvokeWebServiceActivity ... 51 execution styles 51 fault handling activities 87-89 first workflow, creating 19-24 local communication events, activities 84-87 local communication services 179 local communication services, ... activities, for compensation about 90, 91 CompensatableSequenceActivity 91 CompensatableTransactionScopeActivity 91 CompensateActivity 92 activities, for conditions and rules about 92 ConditionedActivityGroup
Ngày tải lên: 20/03/2019, 14:16
MICROSOFT .NET (C#) PROFESSIONAL PROGRAMMING FOR REAL LIFE pdf
... trong C# 11 Kiểu dữ liệu trong C# 11 Input/Output trong C# căn bản 11 Cấu trúc điều khiển trong lập trình C# 12 Cấu trúc if 12 Cấu trúc switch … case 12 Cấu trúc vòng lặp trong lập trình C# ... Tuấn Anh - Cổng CNTT Việt Nam 11 Khai báo biến trong C# Các biến trong C# được khai báo theo công thức như sau: AccessModifier DataType VariableName; Trong đó, AccessModifier: xác định ưu ... TÁC GIẢ Tài liệu này được Phạm Tuấn Anh thực hiện nhằm phục vụ mục đích đào tạo nhân lực trong chương trình đào tạo công nghệ .NET do Cổng Công nghệ thông tin Việt Nam thực hiện, và được
Ngày tải lên: 27/06/2014, 03:20
Win32 Programming Tutorial Tham khảo toàn diện về Con trỏ trong C/C++ ppt
... thường, các đối tượng có thể được truy xuất bằng một trong 2 cách: trực tiếp bằng đại diện hoặc gián tiếp bằng con trỏ Các biến con trỏ được định nghĩa trỏ tới các đối tượng có một kiểu dữ liệu cụ ... qua tên của đối tượng Tham chiếu nâng cao tính hữu dụng của con trỏ và sự tiện lợi của việc truy xuất trực tiếp các đối tượng Chúng được sử dụng để hổ trợ gọi thông qua tham chiếu của các tham ... giá trị của pInt là 1776 (địa chỉ của biến var) Vì con trỏ cũng là biến cho nên nó cũng phải có địa chỉ trong bộ nhớ, còn số byte cần thiết cho con trỏ có thể là 2 hoặc 4 byte phụ thuộc hệ điều
Ngày tải lên: 29/06/2014, 08:20
Apress Expert C sharp 2005 (Phần 3) pdf
... Csla.Core.IUndoableObject Cascading the Call to Child Objects or Collections If the field is a reference to a Csla.Core.IUndoableObject, the CopyState() call must be cascaded to that object, so that it can take ... editable collection base classes Csla.Core.IReadOnlyObject Interface implemented by all read-only base classes Csla.Core.IReadOnlyCollection Interface implemented by all read-only collection base classes ... classes Csla.Core.ICommandObject Interface implemented by CommandBase Csla.Core.ObjectCloner... this may be a regular field or it may be a reference to a child object that implements Csla.Core.IUndoableObject
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 5) pdf
... the class within which the criteria class is nested. Csla.Server.CallMethodException The MethodCaller class throws a custom Csla.Server.CallMethodException in the case that an exception occurs ... _innerStackTrace = ex.StackTrace; } Then in the StackTrace property of CallMethodException, the stack trace for the CallMethod➥ Exception itself is combined with the stack trace from the original exception: ... svc.Fetch(criteria, context); } finally { if (svc != null) svc.Dispose(); } } Notice the try…catch block, which ensures... 6323 _c0 4_final.qxd 2/27/06 1:25 PM Page 189 CHAPTER 4 s DATA ACCESS
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 8) pdf
... esour ces to projects. Since this process is common across several other processes, we can centralize it into a use case that’s referenced from the others. CHAPTER 6 ■ OBJECT-ORIENTED APPLICATION ... objects, allowing you to start creating a basic class diagram or organizing the classes using CRC cards. Table 6-2 lists the high-level CRC data for each potential object. CHAPTER 6 ■ OBJECT-ORIENTED ... with a Resource instead of a Project. CHAPTER 6 ■ OBJECT-ORIENTED APPLICATION DESIGN 331 Figure 6-3. The ProjectResources collection and the ProjectResource child object 6323_c06_final.qxd 2/26/06
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 14) pdf
... ExistsCommand class, 456–457 main areas of each class, 405 Project class, 408–429 ProjectList class, 446 ProjectResource class , 434–439 ProjectResources class, 429–434 ProjectTracker application classes, ... DataPortalContext class, 167 ClientContext property ApplicationContext class, 230 ClientCulture DataPortalContext class, 167 ClientUICulture DataPortalContext class, 167 Clone method BusinessBase class, ... physical architecture description, 2 layers and logical architecture, 2 logical and physical architectures, 1–17 physical model, 4–8 performance, 5 scalability, 5 physical n-tier architecture
Ngày tải lên: 06/07/2014, 00:20
gdi programming with c sharp phần 1 pptx
... 2.3. Tutorial: Your First GDI+ Application Section 2.4. Some Basic GDI+ Objects SUMMARY Chapter 3. The Graphics Class Section 3.1. Graphics Class Properties Section 3.2. Graphics Class ... graphics topics covered to reinforce the concepts presented." —Charles G. Parker, President, Parallel Consulting, Inc. "Graphics Programming with GDI+ is a comprehensive reference for ... GDI+Painter Application SUMMARY Chapter 5. Colors, Fonts, and Text Section 5.1. Accessing the Graphics Object Section 5.2. Working with Colors Section 5.3. Working with Fonts Section 5.4.
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 2 ppt
... rect5 = Rectangle.Round(rect2); // Draw rectangles g.DrawRectangle(Pens.Black, rect3); g.DrawRectangle(Pens.Red, rect5); // Intersect rectangles Rectangle isectRect = Rectangle.Intersect(rect3,... ... rect2 = new RectangleF(40.2f, 40.6f, 100.5f, 100.0f); RectangleF rect1 = new RectangleF(pt, sz); Rectangle rect3 = Rectangle.Ceiling(rect1); Rectangle rect4 = Rectangle.Truncate(rect1); Rectangle ... background color of the surface as the background color of the form. Caution When you create a Graphics object using the CreateGraphics method, you must dispose of that object explicitly by calling
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 3 docx
... Save color as background color, // and fill text box with this color backClr = clrDlg.Color; textBox2.BackColor = backClr; } } The last step is to apply the selected styles and colors, create ... ArrayList(); struct sliceData { public int share; public Color clr; }; private Color curClr = Color.Black; int shareTotal = 0; The Select Color button allows us to select the color for a share ... DialogResult.OK) { // Save color as foreground color, // and fill text box with this color forClr = clrDlg.Color; textBox1.BackColor = forClr; } } private void BackColorBtn_Click(object sender, System.EventArgs
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 4 pptx
... background color ActiveCaptionText Active window title bar text color AppWorkspace Multiple-document interface (MDI) workspace background color Control Control background color ControlDark 3D control ... Desktop... Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); string str = "#FF00FF"; ColorConverter clrConverter = new ColorConverter(); Color clr1 = (Color)clrConverter.ConvertFromString(str); ... // Create Graphics object Graphics g = this.CreateGraphics(); // Create Color object from ARGB Color redColor = Color.FromArgb(120, 255, 0, 0); // Create Color object form color name Color
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 6 potx
... Color.Green; colorMap2.OldColor = Color.Yellow; colorMap2.NewColor = Color.Navy; colorMap3.OldColor = Color.Blue; colorMap3.NewColor = Color.Aqua; // Create an... records describing the respective objects ... = new ColorMap(); ColorMap colorMap2 = new ColorMap(); ColorMap colorMap3 = new ColorMap(); // Set the ColorMap objects' properties colorMap1.OldColor = Color.Red; colorMap1.NewColor = Color.Green; ... EnumerateMetaFile_Click(object sender, System.EventArgs e) { // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create a Metafile object from a file Metafile curMetafile
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 7 potx
... e) { Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create color and points arrays Color[] clrArray = {Color.Red, Color.Blue, Color.Green, Color.Pink, Color.Yellow, Color.DarkTurquoise}; ... System.EventArgs e) { // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create a GraphicsPath object GraphicsPath path = new GraphicsPath(); // Create an array ... TransformUnits_Click(object sender, System.EventArgs e) { // Create a Graphics object and set its // background as form's background Graphics g = this.CreateGraphics(); g.Clear(this.BackColor);
Ngày tải lên: 12/08/2014, 19:20
c sharp programming
... generic type declaration. Like fields, methods can be static (associated with and accessed through the class) or instance (associated with and accessed through an object instance of the class). Constructors A ... C: \WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe hello.cs • For Mono run mcs hello.cs. • For users of cscc, compile with "cscc -o <name>.exe <name>.cs". Doing so will produce ... C# Programming Chapter 3 int variableWithLimitedScope; // "variableWithLimitedScope" is accessible in this code block. } catch(Exception) { // Here is yet another code block. ...
Ngày tải lên: 31/03/2014, 16:41