Console.ReadLine(); }//Main
|
|
- Lesley Bell
- 6 years ago
- Views:
Transcription
1 IST 311 Lecture Notes Chapter 13 IO System using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; namespace Chapter13FileSystem class Program static void Main(string[] args) Experiment00(); // using System.IO Experiment01(); // write a data set Experiment02(); // read a disk data set List<Person> ladies = Experiment03(); //split line to get fragments(first, last, phone) Experiment04(ladies); // echo collection of Person objects Experiment05(); // using BinaryReader & BinaryWriter Experiment06(); // random file Experiment07(); // WebClient for Internet exchange Console.ReadLine(); //Main private static void Experiment07() Console.WriteLine("\nExperiment07 >>>\n"); // create a new instance of WebClient to get NPR RSS Headlines page WebClient client = new WebClient(); string urlheadlinesnpr = " // in this example the response is an HTML page string response = client.downloadstring(urlheadlinesnpr); Console.WriteLine("Response:\n0", response); Console.WriteLine(e.Message); private static void Experiment05() Console.WriteLine("\nExperiment05 >>>\n"); //using BinaryReader & BinaryWriter FileStream filstream = new FileStream(@"c:\temp\test.bin", FileMode.Create); BinaryWriter binwriter = new BinaryWriter(filStream); double avalue = 3.14; binwriter.write("hello world"); for (int i = 0; i < 11; i++) binwriter.write(i);
2 binwriter.write(avalue); binwriter.close(); filstream.close(); string strvalue; int intvalue; double douvalue; //using BinaryReader (continuation) FileStream filstreamin = new FileStream(@"c:\temp\test.bin", FileMode.Open); BinaryReader binreader = new BinaryReader(filStreamIn); //filstreamin.seek(0, SeekOrigin.Begin); strvalue = binreader.readstring(); Console.WriteLine("STRING >> 0", strvalue); for (int i = 0; i < 11; i++) intvalue = binreader.readint32(); Console.WriteLine("INT >> 0", intvalue); douvalue = binreader.readdouble(); Console.WriteLine("DOUBLE >> 0", douvalue); Console.WriteLine("\nDone...\n"); private static void Experiment06() Console.WriteLine("\nExperiment06 >>>\n"); //read & write fixed-length records to a random file String rec1 = "111 FirstName1 LastName1 Phone1"; String rec2 = "222 FirstName2 LastName2 Phone2"; String rec3 = "333 FirstName3 LastName3 Phone3"; int reclen = rec1.length; byte[] buffer = new byte[reclen]; //buffer = Encoding.ASCII.GetBytes(rec1); //Console.WriteLine("buffer " + buffer); //rec1 = Encoding.ASCII.GetString(buffer); //Console.WriteLine("string " + rec1); //create original version of the file using (FileStream fs = new FileStream(@"c:\temp\people.dat", FileMode.Create)) using (BinaryWriter bw = new BinaryWriter(fs)) buffer = Encoding.ASCII.GetBytes(rec1); bw.write(buffer); buffer = Encoding.ASCII.GetBytes(rec2); bw.write(buffer); buffer = Encoding.ASCII.GetBytes(rec3); bw.write(buffer); //read from random file (traversing in reverse order) using (FileStream fs = new FileStream(@"c:\temp\people.dat", FileMode.Open)) using (BinaryReader br = new BinaryReader(fs)) for (int position = 2; position >= 0; position--)
3 int offset = position * reclen; fs.seek(offset, SeekOrigin.Begin); br.read(buffer, 0, reclen); Console.WriteLine("Position 0 Record: 1", position, Encoding.ASCII.GetString(buffer)); // // misc. operators, learning how to use the System.IO namespace utilities private static void Experiment00() Console.WriteLine("\nExperiment00 >>>\n"); File.Delete(@"c:/temp/dummyTextFile1.txt"); File.Delete(@"c:/temp/dummyTextFile2.txt"); File.AppendAllLines(@"c:/temp/dummyTextFile1.txt", new string[] " Line1\n Line2\n Line3\n" ); File.AppendAllText(@"c:/temp/dummyTextFile1.txt", " Line4\n Line5\n Line6"); Console.WriteLine(File.Exists(@"c:/temp/dummyTextFile1.txt")); Console.WriteLine(File.GetAccessControl(@"c:/temp/dummyTextFile1.txt")); Console.WriteLine(File.GetAttributes(@"c:/temp/dummyTextFile1.txt")); String filename Console.WriteLine("FileName: 0", filename); Console.WriteLine("Attributes: 0", File.GetAttributes(fileName)); Console.WriteLine("Created: 0", File.GetCreationTime(fileName)); Console.WriteLine("Last Accessed: 0", File.GetLastAccessTime(fileName)); FileInfo fileinfo = new FileInfo(@"c:/temp/dummyTextFile1.txt"); Console.WriteLine("FileInfo.Length 0", fileinfo.length); Console.WriteLine("FileInfo.FullName 0", fileinfo.fullname); Console.WriteLine("FileInfo.DirectoryName 0", fileinfo.directoryname); DirectoryInfo directoryinfo = new DirectoryInfo(@"c:\temp"); Console.WriteLine("directoryInfo.FullName 0", directoryinfo.fullname); Console.WriteLine(); DirectoryInfo dir = new DirectoryInfo(@"c:/temp"); Console.WriteLine("Current Directory: \n0\n", Directory.GetCurrentDirectory()); foreach (FileInfo file in dir.getfiles("*.zip")) Console.WriteLine(file.FullName.PadRight(35, ' ') + " " + file.lastwritetime.tostring().padright(25, ' ') + file.length.tostring().padright(10, ' ')); Console.WriteLine(e.Message); Console.WriteLine("\nDone Experiment01B\n");
4 private static void Experiment04(List<Person> ladies) Console.WriteLine("\nExperiment04 >>>\n"); //Print a list of Person objects (firstname, last, phone) Console.WriteLine("\nExperiment04"); foreach (Person p in ladies) Console.WriteLine(p); // private static List<Person> Experiment03() Console.WriteLine("\nExperiment03 >>>\n"); //read a file holding ladies firstname, LastName, phoneno //use the acquired data to create a List<Person> collection List<Person> people = new List<Person>(); //StreamReader infile = new StreamReader(@"c:/temp/mycsdemofile1.txt"); StreamReader infile = new StreamReader(@"c:/temp/westerosladies.txt"); String line; while ((line = infile.readline())!= null) Console.WriteLine("\nECHO>>> " + line); string[] tokens = line.split(); Console.WriteLine(tokens[0]); Console.WriteLine(tokens[1]); Console.WriteLine(tokens[2]); Person p = new Person(tokens[0], tokens[1], tokens[2]); Console.WriteLine(p); people.add(p); infile.close(); Console.WriteLine("PROBLEM: " + e.message); return people; // // read and display on console data from a text file on disk private static void Experiment02() Console.WriteLine("\nExperiment02 >>>\n"); if (!File.Exists(@"c:/temp/westerosladies.txt")) return; StreamReader infile = new StreamReader(@"c:/temp/westerosladies.txt"); String line; while ((line = infile.readline())!= null) Console.WriteLine("ECHO>>> " + line); infile.close(); Console.WriteLine("PROBLEM: " + e.message);
5 // // write ten lines to a disk file, each holding dummy firstname, last, phone private static void Experiment01() Console.WriteLine("\nExperiment01 >>>\n"); StreamWriter outputfile = new StreamWriter(@"c:/temp/westerosladies.txt"); for (int i = 0; i < 10; i++) outputfile.writeline("ladyfirstname0 ladylastname0 ladyphone0", i); outputfile.close(); Console.WriteLine("Done Phase1"); Console.WriteLine("PROBLEM: " + e.message); Experiment00 >>> True System.Security.AccessControl.FileSecurity Archive FileName: c:/temp/dummytextfile1.txt Attributes: Archive Created: 4/12/ :05:57 PM Last Accessed: 4/13/2016 1:41:26 PM FileInfo.Length 43 FileInfo.FullName c:\temp\dummytextfile1.txt FileInfo.DirectoryName c:\temp directoryinfo.fullname c:\temp Current Directory: C:\temp\Chapter13FileSystem\Chapter13FileSystem\bin\Debug c:\temp\99-camera02.zip 12/19/2014 4:41:14 PM c:\temp\lesson3.zip 4/12/2016 7:22:56 PM c:\temp\westerosladies.zip 4/12/2016 7:22:17 PM 240 Done Experiment01B Experiment01 >>> Done Phase1 Experiment02 >>> ECHO>>> ladyfirstname0 ladylastname0 ladyphone0 ECHO>>> ladyfirstname1 ladylastname1 ladyphone1 ECHO>>> ladyfirstname2 ladylastname2 ladyphone2 ECHO>>> ladyfirstname3 ladylastname3 ladyphone3 ECHO>>> ladyfirstname4 ladylastname4 ladyphone4 ECHO>>> ladyfirstname5 ladylastname5 ladyphone5
6 ECHO>>> ladyfirstname6 ladylastname6 ladyphone6 ECHO>>> ladyfirstname7 ladylastname7 ladyphone7 ECHO>>> ladyfirstname8 ladylastname8 ladyphone8 ECHO>>> ladyfirstname9 ladylastname9 ladyphone9 Experiment03 >>> ECHO>>> ladyfirstname0 ladylastname0 ladyphone0 ladyfirstname0 ladylastname0 ladyphone0 Person[First=ladyFirstName0,Last=ladyLastName0, Phone=ladyPhone0] ECHO>>> ladyfirstname1 ladylastname1 ladyphone1 ladyfirstname1 ladylastname1 ladyphone1 Person[First=ladyFirstName1,Last=ladyLastName1, Phone=ladyPhone1] ECHO>>> ladyfirstname2 ladylastname2 ladyphone2 ladyfirstname2 ladylastname2 ladyphone2 Person[First=ladyFirstName2,Last=ladyLastName2, Phone=ladyPhone2] ECHO>>> ladyfirstname3 ladylastname3 ladyphone3 ladyfirstname3 ladylastname3 ladyphone3 Person[First=ladyFirstName3,Last=ladyLastName3, Phone=ladyPhone3] ECHO>>> ladyfirstname4 ladylastname4 ladyphone4 ladyfirstname4 ladylastname4 ladyphone4 Person[First=ladyFirstName4,Last=ladyLastName4, Phone=ladyPhone4] ECHO>>> ladyfirstname5 ladylastname5 ladyphone5 ladyfirstname5 ladylastname5 ladyphone5 Person[First=ladyFirstName5,Last=ladyLastName5, Phone=ladyPhone5] ECHO>>> ladyfirstname6 ladylastname6 ladyphone6 ladyfirstname6 ladylastname6 ladyphone6 Person[First=ladyFirstName6,Last=ladyLastName6, Phone=ladyPhone6] ECHO>>> ladyfirstname7 ladylastname7 ladyphone7 ladyfirstname7 ladylastname7 ladyphone7 Person[First=ladyFirstName7,Last=ladyLastName7, Phone=ladyPhone7] ECHO>>> ladyfirstname8 ladylastname8 ladyphone8 ladyfirstname8 ladylastname8 ladyphone8 Person[First=ladyFirstName8,Last=ladyLastName8, Phone=ladyPhone8] ECHO>>> ladyfirstname9 ladylastname9 ladyphone9 ladyfirstname9 ladylastname9 ladyphone9 Person[First=ladyFirstName9,Last=ladyLastName9, Phone=ladyPhone9]
7 Experiment04 >>> Experiment04 Person[First=ladyFirstName0,Last=ladyLastName0, Phone=ladyPhone0] Person[First=ladyFirstName1,Last=ladyLastName1, Phone=ladyPhone1] Person[First=ladyFirstName2,Last=ladyLastName2, Phone=ladyPhone2] Person[First=ladyFirstName3,Last=ladyLastName3, Phone=ladyPhone3] Person[First=ladyFirstName4,Last=ladyLastName4, Phone=ladyPhone4] Person[First=ladyFirstName5,Last=ladyLastName5, Phone=ladyPhone5] Person[First=ladyFirstName6,Last=ladyLastName6, Phone=ladyPhone6] Person[First=ladyFirstName7,Last=ladyLastName7, Phone=ladyPhone7] Person[First=ladyFirstName8,Last=ladyLastName8, Phone=ladyPhone8] Person[First=ladyFirstName9,Last=ladyLastName9, Phone=ladyPhone9] Experiment05 >>> STRING >> Hello world INT >> 0 INT >> 1 INT >> 2 INT >> 3 INT >> 4 INT >> 5 INT >> 6 INT >> 7 INT >> 8 INT >> 9 INT >> 10 DOUBLE >> 3.14 Done... Experiment06 >>> Position 2 Record: 333 FirstName3 LastName3 Phone3 Position 1 Record: 222 FirstName2 LastName2 Phone2 Position 0 Record: 111 FirstName1 LastName1 Phone1 Experiment07 >>> Response: <!DOCTYPE html> <html> <head> <title>npr: Page Not Found</title> <meta http-equiv="content-type" content="text/html; charset=iso " /> <meta http-equiv="content-language" content="en-us" />... </head> <body class="missing-404"> <!--#include virtual="/include/navigation/news/header.html"--> <div id="wrapper">... <p class="bottom-missing">it's a shame that your page is lost, but stick around to browse through NPR stories about lost people, places, and things that still haven' <div class="missing-story"> <a href="/templates/story/story.php?storyid= "><img /404/404-1.jpg" alt="amilia Earhart" /></a> <h2><a href="/templates/story/story.php?storyid= ">a... </body> </html>
IST311 Chapter13.NET Files (Part2)
IST311 Chapter13.NET Files (Part2) using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text;
More informationFiles and Streams. Today you will learn. Files and Web Applications File System Information Reading and Writing with Streams Allowing File Uploads
Files and Streams Today you will learn Files and Web Applications File System Information Reading and Writing with Streams Allowing File Uploads CSE 409 Advanced Internet Technology Files and Web Applications
More informationFiles. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies
12 Working with Files C# Programming: From Problem Analysis to Program Design 2nd Edition David McDonald, Ph.D. Director of Emerging Technologies Chapter Objectives Learn about the System.IO namespace
More informationC# Data Manipulation
C# Data Manipulation Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 1 2018/19 H-W. Loidl (Heriot-Watt Univ) F20SC/F21SC
More informationC# Data Manipulation
C# Data Manipulation Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 1 2018/19 H-W. Loidl (Heriot-Watt Univ) F20SC/F21SC
More informationRegEx - Numbers matching. Below is a sample code to find the existence of integers within a string.
RegEx - Numbers matching Below is a sample code to find the existence of integers within a string. Sample code pattern to check for number in a string: using System; using System.Collections.Generic; using
More informationCleveland State University. Lecture Notes Feb Iteration Arrays ArrayLists. V. Matos
Cleveland State University IST311 V. Matos Lecture Notes Feb 17-22-24 Iteration Arrays ArrayLists Observe that various ideas discussed in class are given as separate code fragments in one large file. You
More informationEEE-448 COMPUTER NETWORKS (Programming) Week -6 C# & IP Programming. The StringBuilder Class. StringBuilder Classes. StringBuilder with Append
EEE-448 COMPUTER NETWORKS (Programming) Week -6 C# & IP Programming Turgay IBRIKCI, PhD EEE448 Computer Networks Spring 2011 EEE448 Computer Networks Spring 2011 The StringBuilder Class The StringBuilder
More informationDuhok Polytechnic University Amedi Technical Institute/ IT Dept. Halkawt Rajab Hussain
Duhok Polytechnic University Amedi Technical Institute/ IT Dept. By Halkawt Rajab Hussain 2016-04-02 String and files: String declaration and initialization. Strings and Char Arrays: Properties And Methods.
More informationRegEx-validate IP address. Defined below is the pattern for checking an IP address with value: String Pattern Explanation
RegEx-validate IP address Defined below is the pattern for checking an IP address with value: 240.30.20.60 String Pattern Explanation 240 ^[0-9]1,3 To define the starting part as number ranging from 1
More informationChapter 14: Files and Streams
Chapter 14: Files and Streams Files and the File and Directory Temporary storage Classes Usually called computer memory or random access memory (RAM) Variables use temporary storage Volatile Permanent
More informationTo start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer
C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version
More informationFile Handling Programming 1 C# Programming. Rob Miles
08101 Programming 1 C# Programming Rob Miles Files At the moment when our program stops all the data in it is destroyed We need a way of persisting data from our programs The way to do this is to use files
More informationWindows File I/O. Files. Collections of related data stored on external storage media and assigned names so that they can be accessed later
Windows File I/O Files Collections of related data stored on external storage media and assigned names so that they can be accessed later Entire collection is a file A file is made up of records One record
More informationNetworking Haim Michael. All Rights Reserved.
Networking 1 Introduction The C# programming language offers variety of networking related classes in the System.Net.* name space. These classes support various standard network protocols, such as HTTP,
More informationclass Class1 { /// <summary> /// The main entry point for the application. /// </summary>
Project 06 - UDP Client/Server Applications In this laboratory project you will build a number of Client/Server applications using C# and the.net framework. The first will be a simple console application
More informationA Summoner's Tale MonoGame Tutorial Series. Chapter 15. Saving Game State
A Summoner's Tale MonoGame Tutorial Series Chapter 15 Saving Game State This tutorial series is about creating a Pokemon style game with the MonoGame Framework called A Summoner's Tale. The tutorials will
More informationHands-On Lab. Introduction to the Windows Azure AppFabric Service Bus Futures. Lab version: Last updated: 11/16/2010. Page 1
Hands-On Lab Introduction to the Windows Azure AppFabric Service Bus Futures Lab version: 1.0.0 Last updated: 11/16/2010 Page 1 CONTENTS OVERVIEW... 3 GETTING STARTED: CREATING A SERVICE PROJECT... 5 Task
More informationLIPNET OUTBOUND API FORMS DOCUMENTATION
LIPNET OUTBOUND API FORMS DOCUMENTATION LEGAL INAKE PROFESSIONALS 2018-03-0926 Contents Description... 2 Requirements:... 2 General Information:... 2 Request/Response Information:... 2 Service Endpoints...
More informationAdvanced Programming Methods. Lecture 9 - Generics, Collections and IO operations in C#
Advanced Programming Methods Lecture 9 - Generics, Collections and IO operations in C# Content Language C#: 1. Generics 2. Collections 3. IO operations C# GENERICS C# s genericity mechanism, available
More informationIntroduction. Lecture 5 Files and Streams FILE * FILE *
Introduction Lecture Files and Streams C programs can store results & information permanently on disk using file handling functions These functions let you write either text or binary data to a file, and
More informationF# - BASIC I/O. Core.Printf Module. Format Specifications. Basic Input Output includes
F# - BASIC I/O http://www.tutorialspoint.com/fsharp/fsharp_basic_io.htm Copyright tutorialspoint.com Basic Input Output includes Reading from and writing into console. Reading from and writing into file.
More informationLecture 5 Files and Streams
Lecture 5 Files and Streams Introduction C programs can store results & information permanently on disk using file handling functions These functions let you write either text or binary data to a file,
More informationDuhok Polytechnic University Amedi Technical Institute/ IT Dept. Halkawt Rajab Hussain
Duhok Polytechnic University Amedi Technical Institute/ IT Dept. By Halkawt Rajab Hussain 2016-04-02 Objects and classes: Basics of object and class in C#. Private and public members and protected. Static
More informationProblem Statement. B1: average speed
Problem Statement B1: average speed A woman runs on tracks of different lengths each day. She always times the last lap. Use the time for the last lap (in seconds) and the length of the track (in miles)
More informationPESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Computer Science And Engineering
INTERNAL ASSESSMENT TEST 1 Date : 19 08 2015 Max Marks : 50 Subject & Code : C# Programming and.net & 10CS761 Section : VII CSE A & C Name of faculty : Mrs. Shubha Raj K B Time : 11.30 to 1PM 1. a What
More informationAdvanced Programming C# Lecture 2. dr inż. Małgorzata Janik
Advanced Programming C# Lecture 2 dr inż. Małgorzata Janik majanik@if.pw.edu.pl Winter Semester 2017/2018 C# Classes, Properties, Controls Constructions of Note using namespace like import in Java: bring
More informationAPI Guide MSS-8 and MVS-16
API Guide and MVS-16 Page 1-8 Channel Matrix Switcher Page 10-16 Channel Matrix Switcher and Multi Viewer MVS-16 API Guide for RS232 RS232 Connection: Port Settings: Bps 9600, Data bits 8, Parity None,
More informationProblem Statement. A1: being lapped on the track
Problem Statement A1: being lapped on the track You and your friend are running laps on the track at the rec complex. Your friend passes you exactly X times in one of your laps (that is, you start the
More informationChapter 8 Files. File Streams
Chapter 8 Files Few programs are written that don t involve some type of file input/output. Way back in the days when the C language became popular a set of library functions were designed that have been
More informationINFORMATICS 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 informationThreads & Networking
Threads & Networking C# offers facilities for multi threading and network programming an application roughly corresponds to a process, handled by the OS time sharing simulates multi tasking inside an application
More informationBasic File Handling and I/O
Lecture #11 Introduction File and Stream I/O The System::IO namespace Basic File Handling and I/O The term basic file handling and I/O in Visual C++ refers to various file operations including read from
More informationAbout 1. Chapter 1: Getting started with openxml 2. Remarks 2. Examples 2. Installation of OpenXML SDK and productivity tool on your computer 2
openxml #openxml Table of Contents About 1 Chapter 1: Getting started with openxml 2 Remarks 2 Examples 2 Installation of OpenXML SDK and productivity tool on your computer 2 Create a new Spreadsheet with
More informationFrom what you have learned about C# programming so far, you should
5 Methods and Parameters From what you have learned about C# programming so far, you should be able to write straightforward programs consisting of a list of statements, similar to the way programs were
More informationEngr 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 informationMain Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
More informationLearn C# Errata. 3-9 The Nullable Types The Assignment Operators
1 The following pages show errors from the original edition, published in July 2008, corrected in red. Future editions of this book will be printed with these corrections. We apologize for any inconvenience
More informationUNIVERSITY OF THE FREE STATE MAIN & QWA-QWA CAMPUS RIS 124 DEPARTMENT: COMPUTER SCIENCE AND INFORMATICS CONTACT NUMBER:
UNIVERSITY OF THE FREE STATE MAIN & QWA-QWA CAMPUS RIS 124 DEPARTMENT: COMPUTER SCIENCE AND INFORMATICS CONTACT NUMBER: 4012754 EXAMINATION: Main End-of-year Examination 2013 PAPER 1 ASSESSORS: Prof. P.J.
More informationTECHNOLOGIES. Kick Starting OOPS &.Net Encapsulation Ø Class Ø Struct Ø Interface, Ø Enum Ø Abstraction Ø Access modifiers in.net
Kick Starting OOPS &.Net Encapsulation Class Struct Interface, Enum Abstraction Access modifiers in.net Lab: Using Access modifiers in your project Polymorphism Inheritance Interface Wrapping Up Interview
More informationCSIS 1624 CLASS TEST 6
CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed
More informationApex TG India Pvt. Ltd.
(Core C# Programming Constructs) Introduction of.net Framework 4.5 FEATURES OF DOTNET 4.5 CLR,CLS,CTS, MSIL COMPILER WITH TYPES ASSEMBLY WITH TYPES Basic Concepts DECISION CONSTRUCTS LOOPING SWITCH OPERATOR
More information1 C# 6.0: Practical Guide 6.0. Practical Guide. By: Mukesh Kumar.
1 C# 6.0: Practical Guide C# 6.0 Practical Guide By: Mukesh Kumar 2 C# 6.0: Practical Guide Disclaimer & Copyright Copyright 2016 by mukeshkumar.net All rights reserved. Share this ebook as it is, don
More informationHow to read/write text file
How to read/write text file Contents Use StreamWriter... 1 Create button click event handler... 2 Create StreamWriter... 3 Write to file... 5 Close file... 8 Test file writing... 9 Use StreamReader...
More informationA Summoner's Tale MonoGame Tutorial Series. Chapter 10. Creating Avatars
A Summoner's Tale MonoGame Tutorial Series Chapter 10 Creating Avatars This tutorial series is about creating a Pokemon style game with the MonoGame Framework called A Summoner's Tale. The tutorials will
More informationTutorial on text transformation with pure::variants
Table of Contents 1. Overview... 1 2. About this tutorial... 1 3. Setting up the project... 2 3.1. Source Files... 4 3.2. Documentation Files... 5 3.3. Build Files... 6 4. Setting up the feature model...
More informationIndustrial Programming
Industrial Programming Lecture 6: C# Data Manipulation Industrial Programming 1 The Stream Programming Model File streams can be used to access stored data. A stream is an object that represents a generic
More information9 Hashtables and Dictionaries
9 Hashtables and Dictionaries Chapter 9 Contax T Concrete Stairs HashTables and Dictionaries Learning Objectives Describe the purpose and use of a hashtable Describe the purpose and use of a dictionary
More informationThis tutorial has been prepared for the beginners to help them understand basics of c# Programming.
About thetutorial C# is a simple, modern, general-purpose, object-oriented programming language developed by Microsoft within its.net initiative led by Anders Hejlsberg. This tutorial covers basic C# programming
More informationOVERVIEW ENVIRONMENT PROGRAM STRUCTURE BASIC SYNTAX DATA TYPES TYPE CONVERSION
Program: C#.Net (Basic with advance) Duration: 50hrs. C#.Net OVERVIEW Strong Programming Features of C# ENVIRONMENT The.Net Framework Integrated Development Environment (IDE) for C# PROGRAM STRUCTURE Creating
More informationLecture 8 Building an MDI Application
Lecture 8 Building an MDI Application Introduction The MDI (Multiple Document Interface) provides a way to display multiple (child) windows forms inside a single main(parent) windows form. In this example
More informationemkt Browserless Coding For C#.Net and Excel
emkt Browserless Coding For C#.Net and Excel Browserless Basic Instructions and Sample Code 7/23/2013 Table of Contents Using Excel... 3 Configuring Excel for sending XML to emkt... 3 Sandbox instructions
More informationChapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill
Chapter 11 Data Files McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives Store and retrieve data in files using streams Save the values from a list box and reload
More informationFor this example, we will set up a small program to display a picture menu for a fast food take-away shop.
146 Programming with C#.NET 9 Fast Food This program introduces the technique for uploading picture images to a C# program and storing them in a database table, in a similar way to text or numeric data.
More informationThe contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer.
Web Services Product version: 4.50 Document version: 1.0 Document creation date: 04-05-2005 Purpose The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further
More information// Precondition: None // Postcondition: The address' name has been set to the // specified value set;
// File: Address.cs // This classes stores a typical US address consisting of name, // two address lines, city, state, and 5 digit zip code. using System; using System.Collections.Generic; using System.Linq;
More informationPULSE - API. The purpose of this document is to provide example requests and responses for all relevant Pulse services requests
PULSE - API The purpose of this document is to provide example requests and responses for all relevant Pulse services requests Contents Introduction... 4 Getting Started... 4 Anatomy of a ...6
More informationSharePoint File System Replication Tool. Formation Technology, 2006
SharePoint File System Replication Tool Formation Technology, 2006 SharePoint File System Replication Tool Copyright (C) 2006 Sam Critchley, Formation Technology Group http://www.formation.com.au SharePoint
More informationYou can call the project anything you like I will be calling this one project slide show.
C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise
More informationSimple FTP demo application using C#.Net 2.0
Стр. 1 из 5 Source : Mindcracker Network (www.c-sharpcorner.com) Print Simple FTP demo application using C#.Net 2.0 By Mohammed Habeeb January 18, 2007 An article to demonstrate common FTP functionalities
More informationOccupied versus Unoccupied
A1 Problem Statement Occupied versus Unoccupied Most houses have an electricity meter that records the amount of electricity that has been used since the meter was installed. This is typically recorded
More informationIST311 Chapter 8: C# Collections - Index-Sequential Search List & Dictionary PROGRAM
IST311 Chapter 8: C# Collections - Index-Sequential Search List & Dictionary PROGRAM class Program static void Main(string[] args) //create a few employees Employee e1 = new Employee(1111111, "Tiryon",
More informationConfiguration Web Services for.net Framework
Cloud Contact Center Software Configuration Web Services for.net Framework Programmer s Guide October 2014 This guide describes how to create a client for the Configuration Web Services with the.net framework
More informationBrian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky
Brian Kiser November 2010 Vigilant C# 2.5 Commonwealth of Kentucky Frankfort, Kentucky Table of Contents 1.0 Work Sample Description Page 3 2.0 Skills Demonstrated 2.1 Software development competency using
More informationCS 200 File Input and Output Jim Williams, PhD
CS 200 File Input and Output Jim Williams, PhD This Week 1. WaTor Change Log 2. Monday Appts - may be interrupted. 3. Optional Lab: Create a Personal Webpage a. demonstrate to TA for same credit as other
More information05/31/2009. Data Files
Data Files Store and retrieve data in files using streams Save the values from a list box and reload for the next program run Check for the end of file Test whether a file exists Display the standard Open
More information6: Arrays and Collections
6: Arrays and Collections Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More informationRIS214. Class Test 3
RIS214 Class Test 3 Use console applications to solve the following problems and employ defensive programming to prevent run-time errors. Every question will be marked as follows: mark = copied? -5 : runs?
More informationIntroduction 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 informationCSC 355 PROJECT 4 NETWORKED TIC TAC TOE WITH WPF INTERFACE
CSC 355 PROJECT 4 NETWORKED TIC TAC TOE WITH WPF INTERFACE GODFREY MUGANDA In this project, you will write a networked application for playing Tic Tac Toe. The application will use the.net socket classes
More informationC# - Reflection. It allows examining various types in an assembly and instantiate these types.
C# - Reflection Reflection objects are used for obtaining type information at runtime. The classes that give access to the metadata of a running program are in the System.Reflection namespace. The System.Reflection
More informationSet Up a Two Factor Authentication with SMS.
Set Up a Two Factor Authentication with SMS. Adding two-factor authentication (2FA) to your web application increases the security of your user's data. 1. First we validate the user with an email and password
More informationCreate a cool image gallery using CSS visibility and positioning property
GRC 275 A8 Create a cool image gallery using CSS visibility and positioning property 1. Create a cool image gallery, having thumbnails which when moused over display larger images 2. Gallery must provide
More informationJustin Jones 21 st February 2013 Version 1.1 Setting up an MVC4 Multi-Tenant Site
Setting up an MVC4 Multi-Tenant Site Contents Introduction... 2 Prerequisites... 2 Requirements Overview... 3 Design Structure (High Level)... 4 Setting Up... 5 Dynamic Layout Pages... 15 Custom Attribute
More informationProject #1 Computer Science 2334 Fall 2008
Project #1 Computer Science 2334 Fall 2008 User Request: Create a Word Verification System. Milestones: 1. Use program arguments to specify a file name. 10 points 2. Use simple File I/O to read a file.
More informationCSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O
CSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O 1 Sending Output to a (Text) File import java.util.scanner; import java.io.*; public class TextFileOutputDemo1 public static void
More informationAn implementation of the relational k-means algorithm
An implementation of the relational k-means algorithm Balázs Szalkai Eötvös Loránd University, Budapest, Hungary arxiv:1304.6899v1 [cs.lg] 25 Apr 2013 May 11, 2014 Abstract A C implementation of a generalized
More informationBroker/Universal Messaging
Broker/Universal Messaging C# API Publisher Migration Author: Dave Pemberton Version 1.3 February 2015 5/13/2013 2013 Software AG. All rights reserved. C# API Migration February 2015 Document Information
More information6: Arrays and Collections
6: Arrays and Collections Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More informationLesson07-Arrays-Part4. Program class. namespace Lesson07ArraysPart4Prep { class Program { static double METER_TO_INCHES = 100 / 2.
Lesson07-Arrays-Part4 Program class namespace Lesson07ArraysPart4Prep class Program static double METER_TO_INCHES = 100 / 2.54; static void Main(string[] args) Experiment01(); //Tuples Experiment02();
More informationCOSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Fall HDFS Basics
COSC 6397 Big Data Analytics Distributed File Systems (II) Edgar Gabriel Fall 2018 HDFS Basics An open-source implementation of Google File System Assume that node failure rate is high Assumes a small
More informationFile Practice Problems
1) Write a method reads in from two files and writes them, alternating lines, to an output file. The three file names should be passed into the method as Strings, and then method should NOT thrown any
More informationCase study: ext2 FS 1
Case study: ext2 FS 1 The ext2 file system Second Extended Filesystem The main Linux FS before ext3 Evolved from Minix filesystem (via Extended Filesystem ) Features Block size (1024, 2048, and 4096) configured
More informationI/O STREAM (REQUIRED IN THE FINAL)
I/O STREAM (REQUIRED IN THE FINAL) STREAM A stream is a communication channel that a program has with the outside world. It is used to transfer data items in succession. An Input/Output (I/O) Stream represents
More informationLab - 1. Solution : 1. // Building a Simple Console Application. class HelloCsharp. static void Main() System.Console.WriteLine ("Hello from C#.
Lab - 1 Solution : 1 // Building a Simple Console Application class HelloCsharp static void Main() System.Console.WriteLine ("Hello from C#."); Solution: 2 & 3 // Building a WPF Application // Verifying
More informationString sequence of characters string Unicode Characters immutable they cannot be changed after they have been created.
String A string is basically a sequence of characters A string in C# is an object of type String The string type represents a string of Unicode Characters. String objects are immutable that is they cannot
More informationYour Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output
General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution
More informationUNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS 2614 MODULE TEST 2
UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS CSIS 2614 MODULE TEST 2 DATE: 13 May 2016 TIME: 3.5 hours MARKS: 112 ASSESSOR: Prof. P.J. Blignaut BONUS MARKS: 5 MODERATOR:
More informationDAD Lab. 1 Introduc7on to C#
DAD 2017-18 Lab. 1 Introduc7on to C# Summary 1..NET Framework Architecture 2. C# Language Syntax C# vs. Java vs C++ 3. IDE: MS Visual Studio Tools Console and WinForm Applica7ons 1..NET Framework Introduc7on
More informationA1 Problem Statement Willie s Push-ups
A1 Problem Statement Willie s Push-ups After every football score, Willie the Wildcat does one push-up for every point scored so far in the current game. On the scoreboard at the stadium, there is displayed
More informationCOSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Spring HDFS Basics
COSC 6397 Big Data Analytics Distributed File Systems (II) Edgar Gabriel Spring 2017 HDFS Basics An open-source implementation of Google File System Assume that node failure rate is high Assumes a small
More informationDuhok Polytechnic University Amedi Technical Institute/ IT Dept. Halkawt Rajab Hussain
Duhok Polytechnic University Amedi Technical Institute/ IT Dept. By Halkawt Rajab Hussain 2016-04-02 : Structure declaration and initialization. Access to fields of structure. Array of Structs. 11/10/2016
More informationmode uid gid atime ctime mtime size block count reference count direct blocks (12) single indirect double indirect triple indirect mode uid gid atime
Recap: i-nodes Case study: ext FS The ext file system Second Extended Filesystem The main Linux FS before ext Evolved from Minix filesystem (via Extended Filesystem ) Features (4, 48, and 49) configured
More informationCase study: ext2 FS 1
Case study: ext2 FS 1 The ext2 file system Second Extended Filesystem The main Linux FS before ext3 Evolved from Minix filesystem (via Extended Filesystem ) Features Block size (1024, 2048, and 4096) configured
More informationImplementing a chat button on TECHNICAL PAPER
Implementing a chat button on TECHNICAL PAPER Contents 1 Adding a Live Guide chat button to your Facebook page... 3 1.1 Make the chat button code accessible from your web server... 3 1.2 Create a Facebook
More informationOpenScape Voice V8 Application Developers Manual. Programming Guide A31003-H8080-R
OpenScape Voice V8 Application Developers Manual Programming Guide A31003-H8080-R100-4-7620 Our Quality and Environmental Management Systems are implemented according to the requirements of the ISO9001
More informationAPI Guide MSS-8 and MVS-16
API Guide MSS-8 and Page 2-8 Channel Matrix Switcher MSS-8 Page 13-16 Channel Matrix Switcher and Multi Viewer www.ospreyvideo.com 1 RACKMOUNT 8x8 MATRIX SWITCHER MSS-8 API Instructions for RS232 RS232
More informationCALCULATOR APPLICATION
CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
More informationJava.net Package and Classes(Url, UrlConnection, HttpUrlConnection)
Java.net Package and Classes(Url, UrlConnection, HttpUrlConnection) Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website: www.sisoft.in Email:info@sisoft.in
More informationYou briefly saw in Chapter 1 how to declare a new class called
5 Classes You briefly saw in Chapter 1 how to declare a new class called HelloWorld. In Chapter 2, you learned about the built-in primitive types included with C#. Since you have now also learned about
More information