Type Description Example

Size: px
Start display at page:

Download "Type Description Example"

Transcription

1 Lecture #1 Introducing Visual C# Introduction to the C# Language and the.net Framework According to Microsoft, C# (pronounced C sharp ) is a programming language that is designed for building a variety of applications that run on the.net Framework. C# is simple, powerful, type-safe, and object-oriented. The many innovations in C# enable rapid application development while retaining the expressiveness and elegance of C-style languages. Visual C# is an implementation of the C# language by Microsoft. Visual Studio supports Visual C# with a full-featured code editor, compiler, project templates, designers, code wizards, a powerful and easy-to-use debugger, and other tools. The.NET Framework class library provides access to many operating system services and other useful, well-designed classes that speed up the development cycle significantly. Microsoft defines the.net as a general purpose development platform for any kind of app or workload, providing key capabilities for building high quality apps including automatic memory management and support for modern programming languages. The.NET Framework provides a comprehensive programming model for building all kinds of applications, from mobile to web to desktop. The.NET Core is a set of runtime, library and compiler components that allow programmers to create apps that run on Windows, Mac OS X and Linux. It can be installed locally. The.NET Core runtime, libraries and compiler are all now open source. C# programs run on the.net Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries. The CLR is the commercial implementation by Microsoft of the common language infrastructure (CLI), an international standard that is the basis for creating execution and development environments in which languages and libraries work together seamlessly. Visual Studio 2017 and the Developer Command Prompt Visual Studio 2017 is a rich, integrated development environment (IDE) for creating stunning applications for Windows, Android, and ios, as well as modern web applications and cloud services. It is a full-featured and extensible toolkit for developers to build Windows-based applications. As of Janurary 2018, Microsoft says Visual Studio Community is free for individual developers, open source projects, academic research, training, education, and small professional teams. Students can, thus, download it from the website. The Developer Command Prompt for Visual Studio automatically sets the environment variables that enable you to easily use.net Framework tools. The Developer Command Prompt is installed with full or community editions of Visual Studio. It is not installed with the Express versions of Visual Studio. Throughout this class, students will learn to hand-code C# source code and compile it with Visual Studio s Developer Command Prompt. Later lectures will discuss about the programming basics in more details. C# coding environment and the compiler This section is meant to provide students with a basic understanding of three types of C# codes, console, GUI (graphical user interface), and Windows form, in order to become familiar with the editing tools, compiler, and program-testing environment. A console application is a non-gui application designed to be executed in a command-line interface. However, through this semester, students will focus on creating GUI applications. This lecture is probably the only lecture discussing the building of console applications. Type Description Example Visual C# - Dr. Penn P. Wu 1

2 Console Applications designed to run in a textonly computer interface, such as the Command Prompt. GUI A application that displays its result on a simple GUI-based disalog box. Form A form is a rich client applications for desktop, laptop, and tablet PCs. C# programmers write text-based source codes similar to the following example using any text editor such as the Microsoft Notepad, and then compile the source codes to object codes with C# compiler. The term text-based means the content consists of only a combination of English characters (alphbet, numerals, and symbols). A compiler is a special program that reads statements written in the C# programming language and convert the text-based content into the binary machine code for the computer s processor to read and execute. During compilation the compiler transforms source code into pieces of object codes. Each piece of object codes cannot be executed. The compiler must further assemble object codes into one single executable applications with.exe extension. The Windows operating systems will execute the complted.exe applications. By the way, each object code is known as an assembly in the.net platform. class Welcome static void Main(string[] args) System.Console.Write("Welcome to CIS218 Visual C#!"); A later section will explain the generic anatomy of C# programs. In the above example, Welcome is a programmer-defined class. In C#, such class defines an entity which describes the behavior of its members. The only member in the Welcome class is the Main() method. A method of the class is a set of statements to be executed to generate desired results. The following figure illustrates how the C# compiler converts a C# source code into an.exe application. class Welcome Object code 1 Object code 2 Object code n It is necessary to note that C# compiler is installed only when a version of Visual Studio (such as Visaul Studio Community) is installed to a Windows machine. Without a successful installation of Visual Studio version, the above C# source code cannot be compiled into an.exe application. With the Visual Studio installed in a Windows machine, programmer can launch the Developer Command Prompt (not the regular Window Command Prompt). Windows 10 users need to open the Start menu, press the Windows logo key, and then enter dev on the Start menu to bring a list of installed apps, choose the Developer Command Prompt. By Visual C# - Dr. Penn P. Wu 2

3 default, the Developer Command Promtp displays the following path after being launched, where X is the drive name (such as C ). X:\Program Files\Microsoft Visual Studio\2017\Community> C# source codes must be save as text file and adopt the.cs file extension, such as Welcome.cs. Throughout this course, the instructor recommends students to use Microsoft Notepad as editor to write all the source codes. The following figure illustrates how you use Notepad to save the source code in a file named Welcom.cs as a generic text file. In a Notepad window, click File and then Save As... Always make sure to the Save as type: is changed to All Files (*.*); otherwise, Notepad might automatically adds.txt to the file name ( Welcome.cs.txt ). Another way to use Notepad to create a source file named Welcome.cs is by typing notepad.exe Welcome.cs (or notepad Welcome.cs) and pressing [Enter] in the Developer Command Prompt. C:\Program Files\Microsoft Visual Studio\2017\Community>notepad.exe Welcome.cs In this course, the instructor recommends students to create a C:\cis218 directory and save all the Visual C# source codes in that directory. The Developer Command Prompt supports the MS-DOS commands, such as md and cd. The md command can create a new directory, while the cd command can change from current directory to the specified directory. To create a new directory named cis218 under the root directory of the C drive, type md c:\cis218 and press [Enter]. C:\Program Files\Microsoft Visual Studio\2017\Community>md C:\cis218 To change to that directory, type cd c:\cis218 and press [Enter]. C:\Program Files\Microsoft Visual Studio\2017\Community>cd C:\cis218 C:\cis218> Throughout this course, students should learn to create a source file in the Developer Command Prompt by typing notepad.exe Welcome.cs (or simply notepad Welcome.cs) and press [Enter] in the prompt. Click Yes after. C:\cis218>notepad Welcome.cs Most textbooks discuss C# programming with examples of console applications. A console application is a computer program designed to be used via a text-only computer interface, such as the Developer Command Prompt which is a command line interface. The following is an example of a simple console application. The file name is Welcome.cs. //File name: Welcome.cs class Welcome Visual C# - Dr. Penn P. Wu 3

4 static void Main() System.Console.Write("Welcome to CIS218 Visual C#!"); The following figure is a screen shot of the above source codes in a Notepad window. In the above code, the two / sign is the comment indicator. In C#, any source code statement starting with // are ignored by the C# compiler. In terms of programming, commnets are human-readable annotation in the source code to provide explanatory information to human readers only. They are ignored by compilers and interpreters. There are two ways of adding comments in C#: single-line and multiline. A single-line comment begins with the two forward slash signs (//). All characters next to the slashes are ignored by the C# compiler. //File Name: sample.cs // The system class namespace Sample // create a name space static class Sample // create a class // create the Main static void Main(string[] args) // end of Main // end of class // end of namespace A pair of comment delimiters, /* and */, can enclose multiple lines of comments. Anything between these two markers are ignored by the c# compiler. For example, /* FileName: sample.cs * Course: CIS218 * Purpose: Demonstration */ namespace Sample... In a Windows machine with Visual Studio installed successfully, programmers can invoke the C# compiler by typing its name, csc.exe, followed by options and the file name of source code on the Developer Command Prompt. The following demonstrates how to compile the source code Welcome.cs to a self-executable program Welcome.exe by typing csc.exe Welcome.cs (or simply csc Welcome.cs) and press [Enter]. Visual C# - Dr. Penn P. Wu 4

5 C:\cis218>csc Welcome.cs Microsoft (R) Visual C# Compiler version Copyright (C) Microsoft Corporation. All rights reserved. During the compilation, the compiler creates a new file, Welcome.exe, which is a selfexecutable application. One way to check its existence is to type dir Welcome.* and press [Enter] in the prompt. The following shows how the output could be if Welcome.exe is created successfully. It is necessary to note the source code will stay the way it is, which means no change is made to its content, even after compilation. C:\cis218>dir Welcome.* Volume in drive C has no label. Volume Serial Number is 84AF-8E2B Directory of C:\cis218 01/01/ :05 PM 875 Welcome.cs 01/01/ PM 13,824 Welcome.exe After compilation, type Welcome.exe (or simply Welcome) and press [Enter] to run the.exe application. C:\cis218>Welcome.exe The above code, again, is a concole application. In Microsoft s term, this Welcome.exe program s Output File Format is set to be DOS-based which means it must be executed in a Command Prompt (or a DOS envrionment). This kind of program will not work in Windows desktop envrionment. The above concole application will generate the following output. C:\cis218> Welcome to CIS218 Visual C#! A later section will discuss the differences between a console and a GUI application. In the next section, the instruction will temporarily jump off the topic to explain what the above source code includes and what its statements mean. Understand the source code Every C# program must have at least one class that hosts the Main() method to describe to the C# compiler where the application should start with. The Main() method in the class then serves as the entry point of the application. The term entry point indicates that all statements in the Main() method are the first statements to be executed when the application is launched. A complicated C# program may contain several classes ; however, only one of these classes is allowed to host the Main() method. The one and the only one class that hosts the Main() method is known as the main class. Each C# class is defined by using the class keyword followed by the class idenfier, as demonstrated below in which ProgramEntry is the identifier and the class is said to be the ProgramEntry class. Inside the ProgramEntry class, there is a Main() method. class ProgramEntry static void Main(string[] args) The signature of the Main() method is static void Main(string[] args). The parameter, string[] args, in the Main() method can pass arguments generated by the Visual C# - Dr. Penn P. Wu 5

6 command-line interface (console) to the Main() method when executing the console application in the command-line interface. Interestingly, GUI and Windows form applications typically run in the Windows desktop environment which does not generate such command-line arguments. Therefore, the string[] args parament is not required for source codes of GUI and Windows form applications. The signature of them is thus: static void Main(). A later section will discuss this topic in details. According to Microsoft s C# Reference, the Main() method must be declare with the static modifier. In C#, any class member declared a static member belongs to the class itself; therefore, static members cannot be referenced through an instance. A static method means the method can only have one version regardless of its type and cannot be overridden. Basically it means no change is allowed. While C# programs can have many methods and programmers can place these methods in any order in the source code, the Main() method is always the method that starts the program and it must be set to static. static void Main(string[] args) Again, it is necessary to note that the String[] args parameter is only required for console application. Throughout the course, students will write GUI applications with the following version. static void Main() The Main() method in C# can also be declared with public access modifier, as shown below. In this case, public specifies that the Main() method can be called from anywhere of the program, static means that Main() does not belong to a specific object, void means the Main() does not return any value, and args is a collection of string arguments generated by the console command-line interface (e.g. the Command Prompt). public static void Main(string[] args) All the basic input, processing, and output (the so-called IPO ) activities can be managed to happen inside the Main() method. In the following example, the instructor uses the Write() method, which is one of the output methods of the Console class of the System namespace in the run-time library, to display a string text on the standard output device (typically the screen). In plain English, the following program displays a message on the prompt. The System namespace contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions. The Console class provides standard input, output, and error streams for console applications. class ProgramEntry static void Main(string[] args) System.Console.Write("Welcome to CIS218 Visual C#!"); The C# language core provides many namespace, such as the System namespace. Each namespace contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions. A namespace often consists of several pre-created classes of the.net Framework as the run-time library. These classese are created by the programers who created Visual C# - Dr. Penn P. Wu 6

7 the C# language core. There are two different ways to use namespaces in C#: (a) the use of fully qualified name and (b) the use of using directives. In the following, each time when the WriteLine() method is called, its fully qualified name (System.Console.WriteLine) must be used; therefore, the following example requires programmers to specify the same fully qualified name every time when the WriteLine method is used. By the way, the WriteLine() displays a string text followed by a new line while Write() method display a string without adding a new line. class ProgramEntry static void Main(string[] args) System.Console.WriteLine("Welcome to CIS218 Visual C#!"); System.Console.WriteLine("You should have fun."); System.Console.WriteLine("Create your own applications."); If the use of fully qualified name is redundant, programmers can choose to import a given namespace with the using directive. The following illustrates how to import the System namespace. Every C# statement must end with a semiclon (;), which indicates the end of line. With the namesapce being imported, classes provided by the namesapce can be referenced and members of these classes can be use as a tool. The following statement demonstrates how to use the Write() method of the Console class. By the way, there is a dot (.) operator, known as member of operator, between a class identifier and the method. class ProgramEntry static void Main(string[] args) Console.WriteLine("Welcome to CIS218 Visual C#!"); Console.WriteLine("You should have fun."); Console.WriteLine("Create your own applications."); In the above console application code, the Main() method contains a parameter, args, which is an array of the string type. The following example demonstrates how to print out the command line arguments using a foreach loop. A later lecture will discuss the foreach structure in details. //Filename: ProgramEntry.cs class ProgramEntry static void Main(string[] args) foreach (string s in args) Console.WriteLine(s); Visual C# - Dr. Penn P. Wu 7

8 After successful compilation, the following demonstrates how to test the above program. C:\cis218>ProgramEntry.exe anita catherine lucy anita catherine lucy Apparently, by importing the System namespace with the using directive at the beginning of the program; every member of the System class can be directly called for use without the need to specify the fully qualifiedg name (e.g. System.Console.Write()). Throughout this course, the instructor will adopt this short-hand way to eliminate the use of fully qualified names. C# programs heavily rely on these input/output methods to take inputs from users and display results of processing as outputs. The Console class also provides the Read() method to read the next character from the standard input stream and the ReadLine() method to read the next line of characters from the standard input stream. The following demonstrates how to implment basic input and output in C# console application. class EntryProgram public static void Main(string[] args) Console.Write("What is your name: "); String name = Console.ReadLine(); Console.WriteLine("Buenos Dias, " + name + "."); In the next section, the instructor will return to the discussion of GUI applications as well as the differences between GUI and console applications. GUI vs. console applications In terms of programming, input process output (IPO) model is a widely adopted guideline for creating basic standalone applications. Modern today operating systems, such as Microsoft Windows, Linux Gnome, and Mac, are all GUI-based. On the other hand, most students now grew up with GUI environment. Taking this fact into consideration, the instructor found it easier for students to learn basics of programming skills through the hand-coding of simple GUI applications. Consequently, the instructor will provide a larget amount of sample code to show students how to develop GUI-based applications in C# throughout this course. Unlike text-based command-line, every GUI-based operating system provides a unique GUI environment known as the OS platform. These OS platform may not be compatible to one another; therefore, each of them usually provide a platform-specific APIs (application programming interfaces). C#, as one of the.net languages, naturally adopts the.net Framework APIs. By narrowing the scope of application development to input and output, one significant differences between console and GUI applications is the design of the UIs (user interfaces). Therefore, the following table compares the input and output tools. Interestingly, the.net Framework does not provide a simple input dialog box. In a later lecture, the instructor will instroduce a custom-made input box code prepared by the instructor for students to use in this course. Type Input Output Console Read(), ReadLine() Write(), WriteLine() GUI MessageBox.Show() Custom-made input box Visual C# - Dr. Penn P. Wu 8

9 The.NET Framework includes a MessageBox class with a Show() method to display a string text in dialog box. A MessageBox object typically contain text, buttons, and symbols that inform and instruct the user. The instructor believes it is one of the simpliest approaches to create basic, simple, and standalone applications for Windows operating systems. The MessageBox class belongs to the System.Windows.Forms namespace which provides classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system. The following is a very simple code that creates a GUI-based application. It uses the Show() method of the MessageBox class of the.net Framework (APIs) to display a string literal, Hello World. The Main() method resides in a programmer-defined class named Hello. By the way, this sample code demonstrates how to use fully qualified name to call the Show() method. //File name: Hello.cs class Hello static void Main() System.Windows.Forms.MessageBox.Show("Hello World!"); In order to test this code, use Notepad to create a text file named Hello.cs and place the source code in it. Then, compile this progrm by typing csc /target:winexe Hello.cs and press [Enter] in the Developer Command Prompt. Unlink console applications, GUI applications most comply with the Common Language Runtime (CLR), which runs the code and provides services that make the development process easier. The /target option specifies the format of the output file that complies with CLR. The /target:exe option force the compiler to create an CLR-based.exe file. Thus, The csc /target:winexe Hello.cs statement instructs the compiler to create a GUI-based executable named Hello.exe. The output looks similar to the following. The MessageBox object is a simple dialog box. By the way, a list of csc.exe compiler options is available at Although the above example chooses to use the fully qualified name to call the Show() method of the MessageBox class: System.Windows.Forms.MessageBox.Show(), programmers can import the System.Windows.Forms namespace with the using directive to eliminate the need of using fully qualified name, as shown below. In the following example, the instructor adds an using directive to import the System.Windows.Forms namespace; therefore, the Show() method can be called without using the fully qualified name. The above code can be re-written to the following. //File name: Hello.cs class Hello Visual C# - Dr. Penn P. Wu 9

10 static void Main() MessageBox.Show("Hello World!"); It is necessary to note that the Main() method does not include any parameter as opposed to Main(string[] args) of console applications. Again, GUI applications do not use command-line interface (as do console applications); therefore, they do not need to collect arguments generated by the command-line interface. Interestingly, by running the GUI application in a Command Prompt, the args parameter can still pick up command-line arguments if the Main() method may contains the args parameter. Again, the args keyword represents an array of command-line arguments. In the following example, if compiled with csc.exe sample.cs and then launched in the Command Prompt, can pick up two strings. The combined string literals is then display in a message box. The MessageBox class provides the definition to create a graphical user interface that displays messages in a pop-up window. You will use the message box frequently throughout this semester. A later lecture will discuss how to hand-code Windows Forms applications in details. //File Name: sample.cs namespace Sample static class CIS218 static void Main(string[] args) MessageBox.Show("Welcome, " + args[0] + " " + args[1]); A sample output looks: C:\cis218>sample.exe Taylor Swift The GUI output looks: Windows Forms application Microsoft defines the term form as a rectangular area that has a combination of GUI components to present information and/or interact with the users by accepting input from the user and displaying the results of processing. Windows Forms, on the other hand, is the name given to the application programming interfaces (APIs) included as a part of the.net Framework. C# is an ideal language for createing Windows form applications. Throughout this course, students will often write code to inherit the Form class provided by the framework to create multiple-control Windows form applications. The term control refers to GUI components such as a button, a checkbox, or a drop-down menu. A later lecture will discuss how to create a rich client application in details. Visual C# - Dr. Penn P. Wu 10

11 The bare minimum code to create a generic Windows form is illustrated below. It uses the Form class of the System.Windows.Forms namespace to declare and construct a Windows form object named form1. It also uses the Run() method of the Application class to begin running a standard application message loop on the current thread to actually creates the form1 object. // File Name: Sample.cs class Sample static int Main() Form form1 = new Form(); Application.Run(form1); return 0; Programmers can manually type in the above code in a generic text editor (such as Notepad), as shown below, save it as a text file named sample.cs, and then compile it using csc.exe /target:exe sample.cs. Again, the /target:exe option forces the compiler to create an.exe file that complies with the CLR (common language runtime). Windows form applications support the Event Model which can interact with users. A later lecture will discuss event programming in details. The following shows how a Windows application uses its Button control to handle the Click event. class Sample static int Main() Form form1 = new Form(); Button button1 = new Button(); button1.text = "Close"; button1.location = new System.Drawing.Point(10, 10); button1.click += new EventHandler(button1_Click); form1.controls.add(button1); Application.Run(form1); return 0; Visual C# - Dr. Penn P. Wu 11

12 private static void button1_click(object sender, EventArgs e) Application.Exit(); While the above code demonstrates the bare minimum statements to create a Windows form. Microsoft suggests programmers to apply the object-oriented programming paradigm to the coding of function-rich Windows Form Applications. The following demonstrates the objectoriented version of the above code in which Form1 is a programmer-defined class that inherits the Form class of the System.Windows.Forms namespace. The Form class provides a set of toolkit to create a window form as well as GUI components the form can host. According to the object-oriented paradigm, a programmer-defined class can have a default constructor to be called automatically to create an object. A default constructor has exactly the same identifier as the class. In the following example, the programmer-defined class is named Form1, the default constructor is thus named Form1(). The [STAThread] statement specifies the application will be created in a Single Thread Apartment model. Microsoft suggests programmers to temporarily avoid any multiple threaded calls during the application launching process. A later lecture will discuss this issue in details. // File Name: sample.cs using System.ComponentModel; using System.Drawing; public class Form1 : Form public Form1() InitializeComponent(); private void InitializeComponent() // add form components here... [STAThread] public static void Main() Application.Run(new Form1()); The above code uses the InitializeComponent() function to defined form components (such as button, label, checkbox, and drop-down menu). The only thing the default constructor, Form1(), does is to call the InitializeComponent() function. The instructor thus simplifies the above code to the following. Throughout the semester, the instructor will frequently use Windows forms to illustrate the outputs of sample codes and the following is the minimum code that will serve as the template. public class Form1 : Form public Form1() // add form components here... Visual C# - Dr. Penn P. Wu 12

13 [STAThread] public static void Main() Application.Run(new Form1()); The following demonstrates how to use the above template code to create a Windows form application with one Label control in it. In order to place the Label in a relative location (10, 10), it is necessary to use the Point() constructor to create an instance of the System.Drawing.Point class; therefore, the instructor chooses to import the System.Drawing namespace. using System.Drawing; public class Form1 : Form public Form1() Label label1 = new Label(); label1.text = "Welcome to CIS218 Visual C#!"; label1.location = new Point(10, 10); label1.size = new Size(260, 30); Controls.Add(label1); [STAThread] public static void Main() Application.Run(new Form1()); Class vs. struct Many students were confused by the fact that both classes and structs are two options to build standalone C# programs. In general, classes are used to model more complex behavior, or data that is intended to be modified after a class object is created. Structs are best suited for small data structures that contain primarily data that is not intended to be modified after the struct is created. This is one of the basic design decisions every framework designer faces when designing data structure. Since this course does not focus on data structure, the instructor plans to avoid discussing whether to design a type as a class (a reference type) or as a struct (a value type) throughout this course. However, it is necessary to depict the differences between class and struct in C#. Attribute class struct Type Reference Value Variable Holds only a reference to the memory address Holds the actual data that keeps data Copy Create a new reference to point to the same memory address Duplication of data With a class being created, when the object reference is assigned to a new variable, the new variable refers to the original object. Changes made through one variable are reflected in the other variable because they both refer to the same data. When the struct is assigned to a new variable, it is copied. The new variable and the original variable therefore contain two separate copies of the same data. Changes made to one copy do not affect the other copy. Visual C# - Dr. Penn P. Wu 13

14 All the sample above codes contains at least one programmer-defined class. However, a standalone C# application can be built by having only one struct, because C# allows programmers to use both classes and structs to define data structure for the application and its users to use. The instructor must reiterate that the following is just an example to show how to build a simple program with a C# struct, yet it is not a recommended approach and students should avoid building standalone applications using only a C# struct. struct struct ProgramEntry static void Main() System.Console.Write("Welcome to CIS218 Visual C#!"); class class ProgramEntry static void Main() System.Console.Write("Welcome to CIS218 Visual C#!"); On the left, ProgramEntry is declared as a C# struct while the one on the right is declared as a C# class, and in this case they produces the same result due to the simplicity of the code. However, it is necessary to note that a C# struct is typically used to encapsulate small groups of related variables, such as the coordinates of a rectangle or the characteristics of an item in an inventory. The following is an example of typical usage of a C# struct. It groups three variables: price, title, and author as Book to be used as data type with an identifier Book. public struct Book public string author; public string title; public double price; A struct can have a default constructor which has the same identifier as the struct itself. In the following, the instructor creates Book() as the default constructor which takes three parameters, a, t, an p, for the user to specify values of price, title, and author. By the way, the values are first assigned to a, t, and p, and then transfer to price, title, and author. public struct Book public string author; public string title; public double price; public Book(string a, string t, double p) author = a; title = t; price = p; class ProgramEntry static void Main() Book b1 = new Book("Nicolas Cardin", "Visual C#", 31.25); Visual C# - Dr. Penn P. Wu 14

15 Book b2 = new Book("Wayne Chen", "Principle of Visual C#", 47.95); MessageBox.Show(b1.author); The above example also demonstrate the preferred way to use c# struct: to provide a data structure for a C# class. ProgramEntry class is a programmer-defined class which uses data structure defined in the Book struct. Partial class C# allows programmers to split a class definition. When working on large projects, spliting a class over separate files enables programmers to add codes without having to recreate the source file. Visual Studio uses this approach when it creates Windows Forms, Web service wrapper code, and so on. Another benefit to split a class definition is that multiple programmers to work on it at the same time. The following example explains how to use the partial keyword modifier to split a class definition. By the way, after spliting, each partial class is known as a part. All the parts must use the partial keyword. All the parts must be available at compile time to form the final type. All the parts must have the same accessibility, such as public, private, and so on. public partial class Number public int Square(int x) return x*x; public partial class Number public int Cube(int x) return x*x*x; public partial class Number static void Main() Number n1 = new Number(); MessageBox.Show(n1.Square(5) + ", " + n1.cube(5)); The above code is equivalent to the following. public class Number public int Square(int x) return x*x; public int Cube(int x) return x*x*x; static void Main() Number n1 = new Number(); MessageBox.Show(n1.Square(5) + ", " + n1.cube(5)); Visual C# - Dr. Penn P. Wu 15

16 void Main() vs. int Main() Many students who are new to C# often confused about the difference between void Main() and int Main() and does C# allows the Main method to return void and an int? This issue could have a historical background. Older langauges, such as C and C++, require the console application's main() method to return an int value to report (or communicate) processing status of the main() method to/with other programs or scripts that invoke the executable file. Yet, such reporting or communication is not required in C#, particularly Windows form applications written in C#. When a program is executed in Windows, any value returned from the Main function is stored in an environment variable called ERRORLEVEL. In the instructor s opinion, allowing either void or int type of Main() in C# is just a compromise of programmers preferences. The following compares these two types. Both programs produce the same result; however, the int type must return an integer to its caller. By the way, traditionally, a return value of zero indicates successful execution. The following example is a simple program that returns zero from the Main function. The zero indicates that the program ran successfully. void public class Number static void Main() MessageBox.Show("Hello!"); int public class Number static int Main() MessageBox.Show("Hello!"); return 0; Apparently, returning void allows for slightly simpler code. The instructor chooses to use the void type throughout this course. Programmerdefined namespace C# Programmers can declare their own namespaces in order to control the scope of class and method names in larger programming projects. A namespace is a logical package that bind two or more classes to one single identifier (name). The following is a sample namespace, Sample, that contain three classes: Sample1, Sample2, and Sample3. namespace Sample static class Sample1 static class Sample2 static class Sample3 It is possibly a good practice to group several inter-related C# classes in one namespace. For example, A C# game project may require at least 5 classes to support a default class. Group all these class in a namespace can rigorously organize code and provide an efficient way to create globally unique types. Visual C# - Dr. Penn P. Wu 16

17 Invader namespace Alien class UFO class Missile class Space Ship class Soldiers class The following showcases how to create a namespace called Invader, in which the Invader class is the default class and five other classes support the default class. Although the instructor chose to declare the default class as static, it is an option. namespace Invader static class Invader //default class class Alien class Missile class UFO... In a namespace that has two or more classes, Visual C# treats the class that has the same identifier (name) as that of the namespace the default class. The Main() method is conventionally placed in the default class. In the following code, the Main() method is created within the Invader class and is used to instantiate one Alient instance (a1), one Missile instance (m1), and one UFO instance (u1). namespace Invader static class Invader //default class static void Main() Alien a1 = new Alien(); // declare and instantiate Missile m1; // declare m1 = new Missile(); // instantiate UFO u1 = new UFO(); class Alien class Missile class UFO The followng demonstrates how to use the namespace keyword to declare a namespace named Shape which contains Circle, Triangle, and Rectangle classes. // Filename: Shape.cs namespace Shape class Circle Visual C# - Dr. Penn P. Wu 17

18 public Circle(double r) MessageBox.Show(r*r*Math.PI + ""); class Triangle public Triangle(double h, double l) MessageBox.Show(h*l/2 + ""); class Rectangle public Rectangle(double w, double h) MessageBox.Show(w*h + ""); The above source code can be save as an invidual file named Shape.cs and becomes a library to the following code which imports the Shape namespace with the using directive. using Shape; class MyShape static void Main() Circle c1 = new Circle(2.25); Triangle t1 = new Triangle(7.1, 3.27); Rectangle r1 = new Rectangle(3.1, 5.3); The following demonstrates another approach which simply place the MyShape class inside the Shape namespace and save the entire file in one single.cs file. namespace Shape class Circle public Circle(double r) MessageBox.Show(r*r*Math.PI + ""); class Triangle public Triangle(double h, double l) MessageBox.Show(h*l/2 + ""); class Rectangle Visual C# - Dr. Penn P. Wu 18

19 public Rectangle(double w, double h) MessageBox.Show(w*h + ""); class MyShape static void Main() Circle c1 = new Circle(2.25); Triangle t1 = new Triangle(7.1, 3.27); Rectangle r1 = new Rectangle(3.1, 5.3); It is necessary to note that most of the sample code provided by the instructor throughout this course are simple, small-scaled, standalone programs, the instructor chooses not to define a programmer-defined namespace, such as the one below which does not include any programmer-defined namespace. class MyShape static void Main() MessageBox.Show("I do not need my own namespace."); The following is another example that collect two supporting classes, CIS218 and Fun, in a namespace called Sample. The namespace has a default class named Sample. namespace Sample static class Sample // default class static void Main(string[] args) string str = "Learning C#!"; CIS218 c = new CIS218(); Fun f = new Fun(); MessageBox.Show(str + " " + c.showit() + " " + f.msg); class CIS218 // a non-static supportive class public string showit() return "Welcome to CIS218!"; class Fun // another non-static supportive class Visual C# - Dr. Penn P. Wu 19

20 public string msg; public Fun() msg = "C# is fun!"; The output looks: The CIS218 class is a non-static class, and is meant to be a supportive class that provides the definition custom-made data type. It can be used to create an object (for instantiation). An instance of the CIS218 class is created in the Sample class (the default class that has the Main() method). An object c represents the instance in the Sample class, which can then uses all the members of CIS218 inside the Sample class. Notice that showit() is a method defined in the CIS218 class; therefore, programmers need to use the dot (.) operator (which is an operator for accessing a member of a class) in the format of: classname.membername. By the way, the qualified name (full name) of the CIS218 class in is Sample.CIS218. The following illustrates how to create an object (instance) of the CIS218 class and use it to access the showit() method. CIS218 c = new CIS218(); MessageBox.Show(c.showIt()); The Fun class is another non-static supportive class which provides another data structure for Sample class to reference with and use. The following demonstrates how to create an instance of the Fun class and access the msg property. Fun f = new Fun(); MessageBox.Show(f.msg); Review Questions 1. Which is a valid file name of a C# code? A. lab1.cs B. lab1.css C. lab1.cpp D. lab1.csharp 2. Which is not an acceptable signature of the C# Main() method? A. static void Main(String[] args) B. static void Main(String args[]) C. static int Main(String[] args) return 0; D. static int Main() return 0; 3. Which creates a C# class named apple? A. class Apple B. new class Apple C. public: static class Apple D. public: new class Apple 4. Which is the correct way to compile a Visual C# code named lab0.cs in the command-line interface? Visual C# - Dr. Penn P. Wu 20

21 A. csc.exe /clr lab0.cs B. csc.exe /t:win lab0.cs C. csc.exe /s:main lab0.cs D. csc.exe lab0.cs 5. The following is a sample code of application. class Test static void Main() System.Console.Write("Welcome to CIS218 Visual C#!"); A. Windows-based GUI B. Windows Forms C. Console D. All of the above 6. Which directive can eliminate the need to use fully qualified name of the following statement? System.Windows.Forms.MessageBox.Show("Hello World!"); A. using Windows; B. using System.Windows; C. #include System.Windows.Forms; D. 7. Given the following code segment, which statement is correct? static int Main(string[] args) A. args is the parameter of the Main() method. B. args is an individual String literal. C. args is an indicator to eliminate all the command-line arguments. D. args must be declared a String variable, not an array. 8. Given the following code, which statement must be added to actually create the Windows form? class MyCode static int Main() Form form1 = new Form(); return 0; A. Application.Run(new form1); B. Application.Run(new Form); C. Application.Run(form1); D. Application.Run(form); 9. Given the following code, which can display "Hello world" is a pop-up message box? class MyCode static int Main() Visual C# - Dr. Penn P. Wu 21

22 return 0; A. MessageBox->Show("Hello world!"); B. MessageBox::Show("Hello world!"); C. MessageBox.Show("Hello world!"); D. MessageBox Show("Hello world!"); 10. Which option of the C# compiler can specify the output file to be a Windows program? A. /t:win B. /target:winexe C. /t:windows D. /target:win Visual C# - Dr. Penn P. Wu 22

23 Lab #1 Introducing Visual C# Preparation #1: Hide extensions for known file types option. (For Windows 10/8 Users Only) 1. Launch the Windows Explorer. 2. Click View. 3. Check the File name extension option. (For Windows 7/Vista Users Only) 1. Launch the Windows Explorer. 2. Click Folders and search options 3. Click the View tab, and then uncheck the Hide extensions for known file types option. 4. Proceed to Preparation #2 now. 4. Click OK. Proceed to Preparation #2 now. Preparation #2: Download Visual C# 2017 Community 1. Use Internet Explorer to visit to download and install the Visual Studio Community for free. Preparation #3: Searching for the Developer Command Prompt Windows 10 Windows Open the Start menu, press the Windows logo key 1. Go to the Start screen, press the Windows logo on the keyboard. 2. On the Start menu, enter dev. This step will bring a list of installed apps. 3. Choose the Developer Command Prompt.. Learning Activity #1: Using Visual C# Command Line Compiler 1. Use Windows Explorer to create a new directory named C:\cis218. key on the keyboard. 2. On the Start screen, press CTRL + TAB to open the Apps list and then enter V. This will bring a list of installed apps. 3. Choose the Developer Command Prompt. 2. Launch the Developer Command Prompt. Do not use regular Windows Command Prompt. 3. In the prompt, type cd c:\cis218 and press [Enter] to change to the C\cis218 directory. The prompt changes to: C:\Program Files\Microsoft Visual Studio\2017\Community>cd c:\cis218 C:\cis218> Visual C# - Dr. Penn P. Wu 23

24 4. In the prompt, type notepad lab1_1.cs to create a new source file named lab1_1.cs, and then click Yes. C:\cis218>notepad lab1_1.cs 5. Type the following contents into the Notepad as shown in Figure 1-1: class lab1_1 static void Main() MessageBox.Show("Welcome to CIS218 Visual C#!"); Figure Click File and then Save to save the file. Click File and then Exit to exit Notepad. 7. Type csc lab1_1.cs and press [Enter] to compile the source file. This process creates a new executable console program named lab1_1.exe. C:\cis218>csc lab1_1.cs Microsoft (R) Visual C# Compiler version for Microsoft (R).NET Framework 4.5 Copyright (C) Microsoft Corporation. All rights reserved. 8. Type dir lab* and press [Enter] to verify if the compilation succeeds, which means the compiler creates a self-executable file named lab1_1.exe. Volume in drive C has no label. Volume Serial Number is 30D5-B37B Directory of C:\CIS218 08/25/ :17 PM 104 lab1_1.cs 08/25/ :18 PM 3,072 lab1_1.exe 2 File(s) 3,176 bytes 0 Dir(s) 31,759,298,560 bytes free 9. Type lab1_1.exe to run the console program. The output looks: 10. Download the assignment template, and rename it to lab1.doc if necessary. Capture a screen shot similar to the above and paste it to the Word document named lab1.doc (or.docx). Important Note: Lab1_1.exe is a console program (not a Windows application), which ONLY works in Command Prompt. Learning Activity #2: Partial class 1. Under the C:\cis218 directory, type notepad lab1_2.cs and press [Enter] to create a new source file named lab1_2.cs, and then type the following contents. Visual C# - Dr. Penn P. Wu 24

25 partial class lab1_2 static String str = "Hello World!"; partial class lab1_2 static void Main(string[] args) MessageBox.Show(str); // a message box 2. Type csc /target:winexe lab1_2.cs and press [Enter] to compile. 3. Type lab1_2.exe and press [Enter] to test the program. 4. Capture a screen shot similar to the above and paste it to the Word document named lab1.doc (or.docx). Learning Activity #3: A Generic Windows form 1. Under the C:\cis218 directory, type notepad lab1_3.cs and press [Enter] to create a new source file, and then add the following contents. class MyCode static int Main(String[] args) // int type Form form1 = new Form(); // create Form object Label label1 = new Label(); // create a Label control label1.text = "Hello Visual C#!"; // specify Label content label1.location = new System.Drawing.Point(10, 10); // fully qualified name form1.controls.add(label1); // add label to form form1.size = new System.Drawing.Size(200, 100); // fully qualified name Application.Run(form1); return 0; 2. Type csc /target:winexe lab1_3.cs and press [Enter] to compile. 3. Type lab1_3.exe and press [Enter] to test the program. 4. Capture a screen shot similar to the above and paste it to the Word document named lab1.doc (or.docx). Visual C# - Dr. Penn P. Wu 25

26 Learning Activity #4: 1. Under the C:\cis218 directory, type notepad lab1_4.cs and press [Enter] to create a new source file, and then add the following contents. using System.ComponentModel; using System.Drawing; public class Form1 : Form public Form1() InitializeComponent(); private void InitializeComponent() Label label1 = new Label(); label1.text = "Welcome to CIS218 Visual C#!"; label1.location = new Point(10, 10); label1.size = new Size(200, 25); this.controls.add(label1); Button button1 = new Button(); button1.text = "Close"; button1.location = new Point(10, 40); button1.click += new EventHandler(this.button1_Click); this.controls.add(button1); this.size = new System.Drawing.Size(200, 120); private void button1_click(object sender, EventArgs e) Application.Exit(); [STAThread] public static void Main() Application.Run(new Form1()); 2. Type csc /target:winexe lab1_4.cs and press [Enter] to compile. 3. Type lab1_4.exe and press [Enter] to test the program. 4. Capture a screen shot similar to the above and paste it to the Word document named lab1.doc (or.docx). Learning Activity #5: Programmer-defined namespace Visual C# - Dr. Penn P. Wu 26

27 1. Under the C:\cis218 directory, type notepad lab1_5.cs and press [Enter] to create a new source file, and then add the following contents. namespace Shape class Circle public double area; public Circle(double r) area = r*r*math.pi; class Triangle public double area; public Triangle(double h, double l) area = h*l/2; class Rectangle public double area; public Rectangle(double w, double h) area = w*h; class MyShape static void Main() Circle c1 = new Circle(2.25); Triangle t1 = new Triangle(7.1, 3.27); Rectangle r1 = new Rectangle(3.1, 5.3); MessageBox.Show(c1.area + "\n" + t1.area + "\n" + r1.area); 2. Type csc /target:winexe lab1_5.cs and press [Enter] to compile. 3. Type lab1_5.exe and press [Enter] to test the program. Visual C# - Dr. Penn P. Wu 27

28 4. Capture a screen shot similar to the above and paste it to the Word document named lab1.doc (or.docx). Programming Exercise: 1. Use Notepad to create a new file named ex01.cs with the following heading lines (be sure to replace YourFullNameHere with the correct one): //File Name: ex01.cs //Programmer: YourFullNameHere 2. Under the above two heading lines, write C# codes to display a text YourFullNameHere wrote this code! in a message box, as shown below. [Hint: read one of the sample codes in the lecture note and learning activity #1.] 3. Download the programming exercise template, and rename it to ex01.doc. Capture a screen shot similar to the above figure and then paste it to the Word document named ex01.doc (or.docx). 4. Compress the source code (ex01.cs), the executable (ex01.exe), and the Word document (ex01.doc or.docx) to a.zip file named ex01.zip. Grading Criteria: You must be the sole author of the codes. You must meet all the requirements in order to earn credits. You must submit both source code (ex01.cs) and the executable (ex01.exe) as response to Question 12 of Assignment 01 to earn credit. No partial credit is given. Submittal 1. Complete all the 5 learning activities and the Programming Exercise in this lab. Create a.zip file named lab1.zip containing ONLY the following self-executable files. (See Appendix C for instructions) lab1_1.exe lab1_2.exe lab1_3.exe lab1_4.exe lab1_5.exe lab1.doc (or.docx) [You may be given zero point if this Word document is missing] 2. Log in to Blackboard, and enter the course site. 3. Upload the zipped file to Question 11 of Assignment 01 as response. 4. Upload the ex01.zip file to Question 12 as response. Appendix A: Compress files to.zip format 1. Open the Windows Explorer and change to the directory that has all the following files (e.g. C:\cis218). 2. lab1_1.exe, lab1_2.exe, lab1_3.exe, lab1_4.exe, and lab1_5.exe 3. Highlight all the five files, and then right click the highlighted area as shown below: Visual C# - Dr. Penn P. Wu 28

29 4. Select Send to, and then Compressed (zipped) folder. This step will create a.zip file. 5. Right click the lab1_x.zip (while x is a number) file and then select Rename. 6. Change the file name to lab1.zip. Visual C# - Dr. Penn P. Wu 29

Operating System x86 x64 ARM Windows XP Windows Server 2003 Windows Vista Windows Server 2008 Windows 7 Windows Server 2012 R2 Windows 8 Windows 10

Operating System x86 x64 ARM Windows XP Windows Server 2003 Windows Vista Windows Server 2008 Windows 7 Windows Server 2012 R2 Windows 8 Windows 10 Lecture #1 What is C++? What are Visual C++ and Visual Studio? Introducing Visual C++ C++ is a general-purpose programming language created in 1983 by Bjarne Stroustrup. C++ is an enhanced version of the

More information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 374 C# and Applications/ IT695 C# Data Structures IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation

More information

Fundamental C# Programming

Fundamental C# Programming Part 1 Fundamental C# Programming In this section you will find: Chapter 1: Introduction to C# Chapter 2: Basic C# Programming Chapter 3: Expressions and Operators Chapter 4: Decisions, Loops, and Preprocessor

More information

However, it is necessary to note that other non-visual-c++ compilers may use:

However, it is necessary to note that other non-visual-c++ compilers may use: Lecture #2 Anatomy of a C++ console program C++ Programming Basics Prior to the rise of GUI (graphical user interface) operating systems, such as Microsoft Windows, C++ was mainly used to create console

More information

INFORMATICS LABORATORY WORK #2

INFORMATICS LABORATORY WORK #2 KHARKIV NATIONAL UNIVERSITY OF RADIO ELECTRONICS INFORMATICS LABORATORY WORK #2 SIMPLE C# PROGRAMS Associate Professor A.S. Eremenko, Associate Professor A.V. Persikov 2 Simple C# programs Objective: writing

More information

The following is a simple if statement. A later lecture will discuss if structures in details.

The following is a simple if statement. A later lecture will discuss if structures in details. Lecture #2 Introduction What s in a C# source file? C# Programming Basics With the overview presented in the previous lecture, this lecture discusses the language core of C# to help students build a foundation

More information

Chapter 1: A First Program Using C#

Chapter 1: A First Program Using C# Chapter 1: A First Program Using C# Programming Computer program A set of instructions that tells a computer what to do Also called software Software comes in two broad categories System software Application

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Introduction History, Characteristics of Java language Java Language Basics Data types, Variables, Operators and Expressions Anatomy of a Java Program

More information

WRITING CONSOLE APPLICATIONS IN C

WRITING CONSOLE APPLICATIONS IN C WRITING CONSOLE APPLICATIONS IN C with Visual Studio 2017 A brief step-by-step primer for ME30 Bryan Burlingame, San José State University The Visual Studio 2017 Community Edition is a free integrated

More information

CPSC 150 Laboratory Manual. Lab 1 Introduction to Program Creation

CPSC 150 Laboratory Manual. Lab 1 Introduction to Program Creation CPSC 150 Laboratory Manual A Practical Approach to Java, jedit & WebCAT Department of Physics, Computer Science & Engineering Christopher Newport University Lab 1 Introduction to Program Creation Welcome

More information

Certified Core Java Developer VS-1036

Certified Core Java Developer VS-1036 VS-1036 1. LANGUAGE FUNDAMENTALS The Java language's programming paradigm is implementation and improvement of Object Oriented Programming (OOP) concepts. The Java language has its own rules, syntax, structure

More information

#using <System.dll> #using <System.Windows.Forms.dll> using namespace System; using namespace System::Windows::Forms;

#using <System.dll> #using <System.Windows.Forms.dll> using namespace System; using namespace System::Windows::Forms; Lecture #13 Introduction Exception Handling The C++ language provides built-in support for handling anomalous situations, known as exceptions, which may occur during the execution of your program. Exceptions

More information

INTERNAL ASSESSMENT TEST 1 ANSWER KEY

INTERNAL ASSESSMENT TEST 1 ANSWER KEY INTERNAL ASSESSMENT TEST 1 ANSWER KEY Subject & Code: C# Programming and.net-101s761 Name of the faculty: Ms. Pragya Q.No Questions 1 a) What is an assembly? Explain each component of an assembly. Answers:-

More information

Conventions in this tutorial

Conventions in this tutorial This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial

More information

CSC116: Introduction to Computing - Java

CSC116: Introduction to Computing - Java CSC116: Introduction to Computing - Java Course Information Introductions Website Syllabus Computers First Java Program Text Editor Helpful Commands Java Download Intro to CSC116 Instructors Course Instructor:

More information

Developing for Mobile Devices Lab (Part 1 of 2)

Developing for Mobile Devices Lab (Part 1 of 2) Developing for Mobile Devices Lab (Part 1 of 2) Overview Through these two lab sessions you will learn how to create mobile applications for Windows Mobile phones and PDAs. As developing for Windows Mobile

More information

Module 2: Introduction to a Managed Execution Environment

Module 2: Introduction to a Managed Execution Environment Module 2: Introduction to a Managed Execution Environment Contents Overview 1 Writing a.net Application 2 Compiling and Running a.net Application 11 Lab 2: Building a Simple.NET Application 29 Review 32

More information

Lab: Supplying Inputs to Programs

Lab: Supplying Inputs to Programs Steven Zeil May 25, 2013 Contents 1 Running the Program 2 2 Supplying Standard Input 4 3 Command Line Parameters 4 1 In this lab, we will look at some of the different ways that basic I/O information can

More information

Calling predefined. functions (methods) #using <System.dll> #using <System.dll> #using <System.Windows.Forms.dll>

Calling predefined. functions (methods) #using <System.dll> #using <System.dll> #using <System.Windows.Forms.dll> Lecture #5 Introduction Visual C++ Functions A C++ function is a collection of statements that is called and executed as a single unit in order to perform a task. Frequently, programmers organize statements

More information

CSC116: Introduction to Computing - Java

CSC116: Introduction to Computing - Java CSC116: Introduction to Computing - Java Intro to CSC116 Course Information Introductions Website Syllabus Computers First Java Program Text Editor Helpful Commands Java Download Course Instructor: Instructors

More information

Compiling and Running an Application from the Command Line

Compiling and Running an Application from the Command Line Appendix A Compiling and Running an Application from the Command Line This appendix describes how to run applications at the command line without using the integrated development environment (IDE) of Visual

More information

Getting started 7. Storing values 21. Creating variables 22 Reading input 24 Employing arrays 26 Casting data types 28 Fixing constants 30 Summary 32

Getting started 7. Storing values 21. Creating variables 22 Reading input 24 Employing arrays 26 Casting data types 28 Fixing constants 30 Summary 32 Contents 1 2 3 Contents Getting started 7 Introducing C# 8 Installing Visual Studio 10 Exploring the IDE 12 Starting a Console project 14 Writing your first program 16 Following the rules 18 Summary 20

More information

Table 1: Typed vs. Generic Codes Scenario Typed Generic Analogy Cash Only Multiply Payment Options. Customers must pay cash. No cash, no deal.

Table 1: Typed vs. Generic Codes Scenario Typed Generic Analogy Cash Only Multiply Payment Options. Customers must pay cash. No cash, no deal. Lecture #15 Overview Generics in Visual C++ C++ and all its descendent languages, such as Visual C++, are typed languages. The term typed means that objects of a program must be declared with a data type,

More information

Introduction to C# Applications

Introduction to C# Applications 1 2 3 Introduction to C# Applications OBJECTIVES To write simple C# applications To write statements that input and output data to the screen. To declare and use data of various types. To write decision-making

More information

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM 1. Introduction This program simply tests your ability to write, compile, execute, and submit programs using the

More information

OGSI.NET UVa Grid Computing Group. OGSI.NET Developer Tutorial

OGSI.NET UVa Grid Computing Group. OGSI.NET Developer Tutorial OGSI.NET UVa Grid Computing Group OGSI.NET Developer Tutorial Table of Contents Table of Contents...2 Introduction...3 Writing a Simple Service...4 Simple Math Port Type...4 Simple Math Service and Bindings...7

More information

public class Animal // superclass { public void run() { MessageBox.Show("Animals can run!"); } }

public class Animal // superclass { public void run() { MessageBox.Show(Animals can run!); } } Lecture #8 What is inheritance? Inheritance and Polymorphism Inheritance is an important object-oriented concept. It allows you to build a hierarchy of related classes, and to reuse functionality defined

More information

Getting started 7. Setting properties 23

Getting started 7. Setting properties 23 Contents 1 2 3 Getting started 7 Introduction 8 Installing Visual Basic 10 Exploring the IDE 12 Starting a new project 14 Adding a visual control 16 Adding functional code 18 Saving projects 20 Reopening

More information

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS INTRODUCTION A program written in a computer language, such as C/C++, is turned into executable using special translator software.

More information

Introduction to C# Applications Pearson Education, Inc. All rights reserved.

Introduction to C# Applications Pearson Education, Inc. All rights reserved. 1 3 Introduction to C# Applications 2 What s in a name? That which we call a rose by any other name would smell as sweet. William Shakespeare When faced with a decision, I always ask, What would be the

More information

COPYRIGHTED MATERIAL. Part I The C# Ecosystem. ChapTEr 1: The C# Environment. ChapTEr 2: Writing a First Program

COPYRIGHTED MATERIAL. Part I The C# Ecosystem. ChapTEr 1: The C# Environment. ChapTEr 2: Writing a First Program Part I The C# Ecosystem ChapTEr 1: The C# Environment ChapTEr 2: Writing a First Program ChapTEr 3: Program and Code File Structure COPYRIGHTED MATERIAL 1The C# Environment What s in This ChapTEr IL and

More information

C# How To Program By Harvey M. Deitel, Paul J. Dietel READ ONLINE

C# How To Program By Harvey M. Deitel, Paul J. Dietel READ ONLINE C# How To Program By Harvey M. Deitel, Paul J. Dietel READ ONLINE If looking for the book by Harvey M. Deitel, Paul J. Dietel C# How to Program in pdf form, then you've come to correct site. We present

More information

Introduction To C#.NET

Introduction To C#.NET Introduction To C#.NET Microsoft.Net was formerly known as Next Generation Windows Services(NGWS).It is a completely new platform for developing the next generation of windows/web applications. However

More information

Overview Describe the structure of a Windows Forms application Introduce deployment over networks

Overview Describe the structure of a Windows Forms application Introduce deployment over networks Windows Forms Overview Describe the structure of a Windows Forms application application entry point forms components and controls Introduce deployment over networks 2 Windows Forms Windows Forms are classes

More information

CSC116: Introduction to Computing - Java

CSC116: Introduction to Computing - Java CSC116: Introduction to Computing - Java Course Information Introductions Website Syllabus Schedule Computing Environment AFS (Andrew File System) Linux/Unix Commands Helpful Tricks Computers First Java

More information

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History Chapter 1 Introduction to Computers, Programs, and Java CS170 Introduction to Computer Science 1 What is a Computer? A machine that manipulates data according to a list of instructions Consists of hardware

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

#using <System.dll> #using <System.Windows.Forms.dll>

#using <System.dll> #using <System.Windows.Forms.dll> Lecture #8 Introduction.NET Framework Regular Expression A regular expression is a sequence of characters, each has a predefined symbolic meaning, to specify a pattern or a format of data. Social Security

More information

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Module Road Map. 7. Version Control with Subversion Introduction Terminology Module Road Map 1. Overview 2. Installing and Running 3. Building and Running Java Classes 4. Refactoring 5. Debugging 6. Testing with JUnit 7. Version Control with Subversion Introduction Terminology

More information

IST311. Advanced Issues in OOP: Inheritance and Polymorphism

IST311. Advanced Issues in OOP: Inheritance and Polymorphism IST311 Advanced Issues in OOP: Inheritance and Polymorphism IST311/602 Cleveland State University Prof. Victor Matos Adapted from: Introduction to Java Programming: Comprehensive Version, Eighth Edition

More information

Sri Vidya College of Engineering & Technology

Sri Vidya College of Engineering & Technology UNIT I INTRODUCTION TO OOP AND FUNDAMENTALS OF JAVA 1. Define OOP. Part A Object-Oriented Programming (OOP) is a methodology or paradigm to design a program using classes and objects. It simplifies the

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;

More information

Object-Oriented Programming in C# (VS 2015)

Object-Oriented Programming in C# (VS 2015) Object-Oriented Programming in C# (VS 2015) This thorough and comprehensive 5-day course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes

More information

20483BC: Programming in C#

20483BC: Programming in C# 20483BC: Programming in C# Course length: 5 day(s) Course Description The goal of this course is to help students gain essential C# programming skills. This course is an entry point into the Windows Store

More information

CHAPTER 7 OBJECTS AND CLASSES

CHAPTER 7 OBJECTS AND CLASSES CHAPTER 7 OBJECTS AND CLASSES OBJECTIVES After completing Objects and Classes, you will be able to: Explain the use of classes in Java for representing structured data. Distinguish between objects and

More information

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney 1 Build Your First App The way to get started is to quit talking and begin doing. Walt Disney Copyright 2015 AppCoda Limited All rights reserved. Please do not distribute or share without permission. No

More information

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang Eclipse Tutorial For Introduction to Java Programming By Y. Daniel Liang This supplement covers the following topics: Getting Started with Eclipse Choosing a Perspective Creating a Project Creating a Java

More information

The Microsoft.NET Framework

The Microsoft.NET Framework Microsoft Visual Studio 2005/2008 and the.net Framework The Microsoft.NET Framework The Common Language Runtime Common Language Specification Programming Languages C#, Visual Basic, C++, lots of others

More information

MATFOR In Visual C# ANCAD INCORPORATED. TEL: +886(2) FAX: +886(2)

MATFOR In Visual C# ANCAD INCORPORATED. TEL: +886(2) FAX: +886(2) Quick Start t t MATFOR In Visual C# ANCAD INCORPORATED TEL: +886(2) 8923-5411 FAX: +886(2) 2928-9364 support@ancad.com www.ancad.com 2 MATFOR QUICK START Information in this instruction manual is subject

More information

Object-Oriented Programming in C# (VS 2012)

Object-Oriented Programming in C# (VS 2012) Object-Oriented Programming in C# (VS 2012) This thorough and comprehensive course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes the C#

More information

Object Oriented Programming in C#

Object Oriented Programming in C# Introduction to Object Oriented Programming in C# Class and Object 1 You will be able to: Objectives 1. Write a simple class definition in C#. 2. Control access to the methods and data in a class. 3. Create

More information

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version. NetBeans Tutorial For Introduction to Java Programming By Y. Daniel Liang This tutorial applies to NetBeans 6, 7, or a higher version. This supplement covers the following topics: Getting Started with

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

EEE-425 Programming Languages (2013) 1

EEE-425 Programming Languages (2013) 1 2 Computer programming: creating a sequence of instructions to enable the computer to do something Programmers do not use machine language when creating computer programs. Instead, programmers tend to

More information

Windows Presentation Foundation Programming Using C#

Windows Presentation Foundation Programming Using C# Windows Presentation Foundation Programming Using C# Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.

More information

JAVA: A Primer. By: Amrita Rajagopal

JAVA: A Primer. By: Amrita Rajagopal JAVA: A Primer By: Amrita Rajagopal 1 Some facts about JAVA JAVA is an Object Oriented Programming language (OOP) Everything in Java is an object application-- a Java program that executes independently

More information

Cpt S 122 Data Structures. Introduction to C++ Part II

Cpt S 122 Data Structures. Introduction to C++ Part II Cpt S 122 Data Structures Introduction to C++ Part II Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Topics Objectives Defining class with a member function

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services

More information

Lecture 02, Fall 2018 Friday September 7

Lecture 02, Fall 2018 Friday September 7 Anatomy of a class Oliver W. Layton CS231: Data Structures and Algorithms Lecture 02, Fall 2018 Friday September 7 Follow-up Python is also cross-platform. What s the advantage of Java? It s true: Python

More information

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

Classes in C# namespace classtest { public class myclass { public myclass() { } } } Classes in C# A class is of similar function to our previously used Active X components. The difference between the two is the components are registered with windows and can be shared by different applications,

More information

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class. 1. What is C#? C# (pronounced "C sharp") is a simple, modern, object oriented, and type safe programming language. It will immediately be familiar to C and C++ programmers. C# combines the high productivity

More information

Creating a new CDC policy using the Database Administration Console

Creating a new CDC policy using the Database Administration Console Creating a new CDC policy using the Database Administration Console When you start Progress Developer Studio for OpenEdge for the first time, you need to specify a workspace location. A workspace is a

More information

DOWNLOAD PDF VISUAL STUDIO 2008 LEARNING GUIDE

DOWNLOAD PDF VISUAL STUDIO 2008 LEARNING GUIDE Chapter 1 : Visual Studio Express - C++ Tutorials Visual Studio Important! Selecting a language below will dynamically change the complete page content to that language. Premier Knowledge Solutions offers

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led CENTER OF KNOWLEDGE, PATH TO SUCCESS Website: PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO 2010 Course: 10550A; Duration: 5 Days; Instructor-led WHAT YOU WILL LEARN This course teaches you

More information

COMP 110 Project 1 Programming Project Warm-Up Exercise

COMP 110 Project 1 Programming Project Warm-Up Exercise COMP 110 Project 1 Programming Project Warm-Up Exercise Creating Java Source Files Over the semester, several text editors will be suggested for students to try out. Initially, I suggest you use JGrasp,

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

Deitel Dive-Into Series: Dive-Into Cygwin and GNU C++

Deitel Dive-Into Series: Dive-Into Cygwin and GNU C++ 1 Deitel Dive-Into Series: Dive-Into Cygwin and GNU C++ Objectives To be able to use Cygwin, a UNIX simulator. To be able to use a text editor to create C++ source files To be able to use GCC to compile

More information

Chapter 2. Editing And Compiling

Chapter 2. Editing And Compiling Chapter 2. Editing And Compiling Now that the main concepts of programming have been explained, it's time to actually do some programming. In order for you to "edit" and "compile" a program, you'll need

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

More information

To get started with Visual Basic 2005, I recommend that you jump right in

To get started with Visual Basic 2005, I recommend that you jump right in In This Chapter Chapter 1 Wading into Visual Basic Seeing where VB fits in with.net Writing your first Visual Basic 2005 program Exploiting the newfound power of VB To get started with Visual Basic 2005,

More information

PTN-202: Advanced Python Programming Course Description. Course Outline

PTN-202: Advanced Python Programming Course Description. Course Outline PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

Course Syllabus C # Course Title. Who should attend? Course Description

Course Syllabus C # Course Title. Who should attend? Course Description Course Title C # Course Description C # is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the.net Framework.

More information

Getting started 7. Setting properties 23

Getting started 7. Setting properties 23 Contents 1 2 3 Getting started 7 Introducing Visual Basic 8 Installing Visual Studio 10 Exploring the IDE 12 Starting a new project 14 Adding a visual control 16 Adding functional code 18 Saving projects

More information

Lecture 7. Log into Linux New documents posted to course webpage

Lecture 7. Log into Linux New documents posted to course webpage Lecture 7 Log into Linux New documents posted to course webpage Coding style guideline; part of project grade is following this Homework 4, due on Monday; this is a written assignment Project 1, due next

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 1 An Introduction to Visual Basic 2005 Objectives After studying this chapter, you should be able to: Explain the history of programming languages

More information

Engr 123 Spring 2018 Notes on Visual Studio

Engr 123 Spring 2018 Notes on Visual Studio Engr 123 Spring 2018 Notes on Visual Studio We will be using Microsoft Visual Studio 2017 for all of the programming assignments in this class. Visual Studio is available on the campus network. For your

More information

CHAPTER 1 Introduction to Computers and Java

CHAPTER 1 Introduction to Computers and Java CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and

More information

Java: Classes. An instance of a class is an object based on the class. Creation of an instance from a class is called instantiation.

Java: Classes. An instance of a class is an object based on the class. Creation of an instance from a class is called instantiation. Java: Classes Introduction A class defines the abstract characteristics of a thing (object), including its attributes and what it can do. Every Java program is composed of at least one class. From a programming

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Creating a Class Library You should have your favorite version of Visual Studio open. Richard Kidwell. CSE 4253 Programming in C# Worksheet #2

Creating a Class Library You should have your favorite version of Visual Studio open. Richard Kidwell. CSE 4253 Programming in C# Worksheet #2 Worksheet #2 Overview For this worksheet, we will create a class library and then use the resulting dynamic link library (DLL) in a console application. This worksheet is a start on your next programming

More information

CHAPTER 7 OBJECTS AND CLASSES

CHAPTER 7 OBJECTS AND CLASSES CHAPTER 7 OBJECTS AND CLASSES OBJECTIVES After completing Objects and Classes, you will be able to: Explain the use of classes in Java for representing structured data. Distinguish between objects and

More information

Mobile Computing LECTURE # 2

Mobile Computing LECTURE # 2 Mobile Computing LECTURE # 2 The Course Course Code: IT-4545 Course Title: Mobile Computing Instructor: JAWAD AHMAD Email Address: jawadahmad@uoslahore.edu.pk Web Address: http://csandituoslahore.weebly.com/mc.html

More information

C# Forms and Events. Evolution of GUIs. Macintosh VT Datavetenskap, Karlstads universitet 1

C# Forms and Events. Evolution of GUIs. Macintosh VT Datavetenskap, Karlstads universitet 1 C# Forms and Events VT 2009 Evolution of GUIs Until 1984, console-style user interfaces were standard Mostly dumb terminals as VT100 and CICS Windows command prompt is a holdover In 1984, Apple produced

More information

Intermediate Python 3.x

Intermediate Python 3.x Intermediate Python 3.x This 4 day course picks up where Introduction to Python 3 leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development. This

More information

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

MEAP Edition Manning Early Access Program Get Programming with Java Version 1 MEAP Edition Manning Early Access Program Get Programming with Java Version 1 Copyright 2018 Manning Publications For more information on this and other Manning titles go to www.manning.com welcome First,

More information

CE221 Programming in C++ Part 1 Introduction

CE221 Programming in C++ Part 1 Introduction CE221 Programming in C++ Part 1 Introduction 06/10/2017 CE221 Part 1 1 Module Schedule There are two lectures (Monday 13.00-13.50 and Tuesday 11.00-11.50) each week in the autumn term, and a 2-hour lab

More information

MA400: Financial Mathematics

MA400: Financial Mathematics MA400: Financial Mathematics Introductory Course Lecture 1: Overview of the course Preliminaries A brief introduction Beginning to program Some example programs Aims of this course Students should have

More information

More About Classes CS 1025 Computer Science Fundamentals I Stephen M. Watt University of Western Ontario

More About Classes CS 1025 Computer Science Fundamentals I Stephen M. Watt University of Western Ontario More About Classes CS 1025 Computer Science Fundamentals I Stephen M. Watt University of Western Ontario The Story So Far... Classes as collections of fields and methods. Methods can access fields, and

More information

Programming in Visual Basic with Microsoft Visual Studio 2010

Programming in Visual Basic with Microsoft Visual Studio 2010 Programming in Visual Basic with Microsoft Visual Studio 2010 Course 10550; 5 Days, Instructor-led Course Description This course teaches you Visual Basic language syntax, program structure, and implementation

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

CIS 3260 Intro. to Programming with C#

CIS 3260 Intro. to Programming with C# Running Your First Program in Visual C# 2008 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Run Visual Studio Start a New Project Select File/New/Project Visual C# and Windows must

More information

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A)

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A) CS708 Lecture Notes Visual Basic.NET Object-Oriented Programming Implementing Client/Server Architectures Part (I of?) (Lecture Notes 5A) Professor: A. Rodriguez CHAPTER 1 IMPLEMENTING CLIENT/SERVER APPLICATIONS...

More information

Introduction to C/C++ Programming

Introduction to C/C++ Programming Chapter 1 Introduction to C/C++ Programming This book is about learning numerical programming skill and the software development process. Therefore, it requires a lot of hands-on programming exercises.

More information

Getting Started with Python and the PyCharm IDE

Getting Started with Python and the PyCharm IDE New York University School of Continuing and Professional Studies Division of Programs in Information Technology Getting Started with Python and the PyCharm IDE Please note that if you already know how

More information

Securing OPC UA Client Connections. OPC UA Certificate handling with the OPC Data Client Development Toolkit s EasyOPCUA Client Objects

Securing OPC UA Client Connections. OPC UA Certificate handling with the OPC Data Client Development Toolkit s EasyOPCUA Client Objects Securing OPC UA Client Connections OPC UA Certificate handling with the OPC Data Client Development Toolkit s EasyOPCUA Client Objects Page 2 of 16 Table of Contents INTRODUCTION 3 THE SAMPLE CODE AND

More information