A Real Life Programmer
I can now officially add the title “programmer” to life’s growing list of accolades! Even though I couldn’t program a robot to take over the world, I do know how to have the user input things into the console, and have the console reply based on what was inputted. “Zork” anyone? Recently my class mates and I have started the second segment of our coding academy where we attempt to slay the beast known as C-Sharp. It is a complete overclock of what we were learning in the intro class, and we are also going through a global pandemic as we do so. So yeah the times are really weird right now and one day when I look back 2020 its going to be full of “What the HECK” moments. Anyway here are the highly anticipated and highly touted tech questions of the week!
- Describe C#. What is it? When, why and who developed it?
C# was developed by Anders Hejlsberg, an employee at Microsoft, in the year 2000. Its intended purpose was to rival Java so its not surprising that it shares many similarities with the latter. C# is a programming language that can be used to build pretty much anything especially games, and window applications. When Java refused to let Microsoft make changes to the language, Microsoft took matters into their own hands!
2. What is the difference between public, static and void?
Public, is the access specifier that allows the method to be used publicly. This is rivaled by “private” where the method can only be used privately but we’ll get more into that later. Static just says that it does not need to access any static members, and void lets us know that it doesn’t return anything. In my short experience we have used the Public Static Void method to make simple, but functioning methods.
4. What are value types and reference types?
There are many types of data that can be entered into the c# program. You can use Bool, which we learned from JS that it means true of false. We can use int which is to use regular numbers (negative or positive). There are many other types of data that can be inputed. You can use the string data type to input words but this is known as a reference type.
5. What are sealed classes in C#?
Sealed classes are used to restrict the inheritance feature of object oriented programming. No class can be derived from a sealed class. A method can also be sealed which means the method will not be able to be overwritten.
6. Developers must learn all the time. In interviews, you will be asked what are you learning about right now. This is because you should always staff on top of the game and know about new things. So discuss something you’re learning about this week as if someone just asked you.
I am learning how to name and call methods in C#. I am learning how to operate a new code editor at the same time I am learning a new language. I am also going to take the plunge and try and learn python alongside c# so that maybe I can learn two languages at once. Not on a technology note but I am also learning how to move around in the new world caused by Covid-19
7. Is C# code is managed or unmanaged code?
C# is a managed code. This means that the codes execution is managed by a runtime. This provides with many useful services such as automatic memory management.
8. Tell us about some of the advantages of C#?
C# has its biggest advantage in the fact that it contains a high memory backup so that memory leakage is not a problem. Its also cross platform so it can be used on many OS including android and macintosh. It also benefits form having a similar syntax to C, C++, and Java.
9. What is the compiler of C#?
Visual Studio can compile C# code.
10. Which string method is used for concatenation of two strings in c#?
The + operator is what can be used to concat two strings. Such as (.name + “How are you doing”) this would take the inout from the user and add it to the how are you doing phrase.