ProgramAssignment1 - CSE Programming in C Programming...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE Programming in C# Roger Crawfis Programming Assignment #1 Write a small program that will read text from the clipboard and output to the console the first 1000 unique words in sorted order, one word per line. You should remove the punctuations marks (. , ; : ? !) and all newlines and carriage returns. You can use the System.String.Split method to accomplish this. If you look at the resulting array you can determine the character keys for newlines, etc. Make sure no empty strings are output as those are not words. Also all unique words should ignore case. You can output the words in all lowercase. The final output should sorted. Hints: Your Main method must have an attribute indicating that it needs to run in a Single Threaded Apartment (STA). This allows .NET to communicate with COM and allows the clipboard to work between native and managed codes. Before Main, add the following line [System. STAThread ] There is a Clipboard class. Use the MSDN help to determine the methods and how to call them.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course CSE 459.24 taught by Professor Crawfis during the Winter '11 term at Ohio State.

Ask a homework question - tutors are online