Home Page
Return to C# Main Page
C# Programming Phase One learning to Program
I took courses 20+ years ago on C++. So learning C# would not be difficult. I downloaded Visual C# 2010 and 2013 Studio. I found C# is extremely easy because much of the work is done for you. The libraries are more robust. Many of the programs we wrote by hand like sorting arrays are now actual functions. I belong to the IEEE and IEEE Computer Society. The IEEE Computer Society has thousands of books and courses on their site to use. I found a book on C#. I have used many of the books and courses to learn from over the last 20 years of membership. It was a benefit of my B.EE. We were all signed up as students. I consider it continuing education.



This is a 3D multiplication table. 3D Multiplication X * Y * Z.
I took a 3D array and added header fields. You take the five sets and stack them in order. You get 0 to 3 on X,Y and Z axis. The tables create a 3D multiplication cube.



This will compare old school sorts vs. C# new sort feature.
Old school sort function
C#'s improved sort function
My old school method used two embedded for statements to compare an array of numbers starting with first element of the array.


Here I am converting kg to lbs and lbs to kg
Weight Conversion
It creates two functions that convert weight from kg to lbs and lbs to kg.








I have been playing with Chapter 8 on LINQ (Language Integrated Query). LINQ Orderby example
I moved on past Chapter 9 on Dictionary functions into Chapter 10 on string formats.
Chapter 10 String formats







This is the last program from Chapter 10. It finished with cultural sensitivity. The different cultural names and their english name for programming for different countries.

Chapter 10 Cultural Sensitivity

This was also the first file I wrote to the computer in C#. I created a file called c:\WriteLines2.txt. Chapter 11 covers creating files and streams.

5.8.2015: Chapter 11: My biggest complaint of programmers is not cleaning up the temp directories that they add files in. EMC Documentum was broken because the .net temp directory have over 65536 temp files in it. It is the magic number to not be able to create another one. So I wrote a program that can delete temp files and directories in c:\windows\temp. It also add a random name temp file into the directory



The program returns an exception for locked files that can't be deleted and Directories that are not empty and can't be deleted.






Copy Change

This program has been having problems with Avast Internet Security. It works great without Avast installed. Disabling deep scanning is getting closer to it working. It crashed on the first or second process scan of the web site.





streams

Streams is about reading and writing content of a file. I added in If filters to exclude characters that are contained and that the names start with.








I am finally getting into the interesting chapters on XML and networking

XML:

9.4.2015: XML the encoding of structured information. These examples continue on using LINQ and add .NET framework to serialize your data for sending and deserialize your data at the destination.



XML Project 1

The first project was to write an application to create a basic XML document in C# using XML.LINQ. This creates an API that makes it earsier to program. It is referred as LINQ to XML.








XML Project 2

The second project was to write and application that includes attributes into the project.


XML Project 3








XML Project 4

This example shows how to search a XML document

XML Project 5

This example does XML Serialization






Bella

I wrote this program to add pictures to a directory and convert them into HTML and CSS code. This allowed me to quickly build my daughter Ann's pages faster. This program was copied to convert each of the different directories.



Ann Clock

I wrote this program calculate Ann's age from her time and date of birth. I am going to convert it into my first text box asp.net page.