Posts

Showing posts from March, 2020

Post #10 Arcade

C# has been a wonderful programming language experience. Now I will create a program to not only show the basic features of C# but also to show off it's cool features we talked about in the previous posts. Let us discuss this program. As the title suggests the best way I have thought of to show off C# is to make an arcade. This arcade will be a basic arcade in the sense that it will have games you can play. In addition it will also have tools that are useful for everyday life. I don't know exactly how long it will be as I will be adding whatever I can manage to get done. Let's talk structure. The entire program will be run off of one namespace. That namespace is basically just going to be my driver. As namespaces are one of the cool things I want to show off there will be multiple namespaces. Each namespace will be it's own program. The driver will obviously have all programs but is unique because it is the main program. So far I've thought of 3 ideas for my ...

Post #9 Scopes

Today's topic is scopes. You have the telescope. It allows you to look at far away places. Pirates and the royal navies used scopes and maps to navigate. You also have camera scopes which you use to take pictures. Then there's a stethoscope which you use to listen to heartbeats.  That was for a little humor since today's topic is very short.  Scopes: Scopes are important in C#. This is a very basic topic but an interesting one. Scopes are basically boundaries. Scopes are used all the time in classes, namespaces, methods, interfaces, and others. The scope of the main function is considered a global scope. This is because a regular scope is basically defined as a set of curly braces({}). Scopes are another way like namespaces where you can isolate code. The difference being there are ways of using namespaces elsewhere. Anything created in a scope is stuck in the scope. Anything can be accessed in it's scope but also in any scopes nested inside it. That being said ...

Post #8 Namespaces

Hi Everyone. Let's talk about the first interesting feature.  Namespaces: Now you may remember me mentioning these before. Namespaces are an interesting feature in C#. They allow you to have separate functions with the same name. Essentially they allow you to isolate and create separate versions of your code. Lets look at an old but good example. It's our favorite program. Hello World! using   System ; namespace   Namespaces {      class   Program     {          static   void   Main ( string []  args )         {              Console . WriteLine ( "Hello World!" );         }     } } This is probably the easiest program to understand namespaces. Now you may look at this and think...

Post #7 Implementation of binary search in the language

Binary Searches VS Other Searches: I feel like it's important to really explain Binary Searches VS Other Searches. Other Searches: When you think of searching you think of typing in the word "apple" into google. When you run a search in a program normally it will be a run through search. By that I mean if your trying to get the number 5 from an array of the integers 0-9 it will see 1 2 3 4 5 and stop at 5. If your looking at the alphabet trying to get Z, your program reads A B C D E F G H I J K L M N O P Q R S T U V W X Y Z and then stops because it found Z. Now imagine your looking for the number 999999999 in an array from 0-1000000000. Now your search will give you all the numbers up to that. If I wrote that out you guys would probably be bored around 100 and would not like me by 1000000 so just imagine it. That is the most basic way of searching also the most complicated. You can also have reverse searching where it starts at the end but you run into the same prob...