I'm just starting out to learn C# with Begin to Code with C# by Rob Myles.
The first thing I note is that he uses a snapsengine libraries to execute any instruction like displaying output. makes me wonder what is actually happening under the hood.
for example
{
public void StartProgram()
{
SnapsEngine.SetTitleString("Begin to Code With C#");
SnapsEngine.DisplayString("Welcome to the world of Snaps");
}
}
I want to be able to display an out put without using a library, then advance to writing my own libraries.
is this how C# is designed to work? Is there a reference for all the libraries?
Please help a beginner
You might need to read about Console
class.
for example:
Console.Write("Begin to Code With C#");
Will write a string in output for you.
Read more here:
https://docs.microsoft.com/en-us/dotnet/api/system.console?view=netcore-3.1
If you are in the beginning of the road to C#, I highly recommend you to take a look at these pages:
https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/ ( Introduction to C# tutorials, which starts with interactive code that you can run in your browser)
https://docs.microsoft.com/en-us/learn/ (Very good resource to discover your path)
https://channel9.msdn.com/Series/CSharp-Fundamentals-for-Absolute-Beginners (You can also start following Channel9 which is a great resource for learning.)
https://channel9.msdn.com/Series/CSharp-101/ (Full Intro to C# video series by Scott Hanselman and Kendra Havens)
https://dotnet.microsoft.com/learn/csharp (Here you can find many great C# learning videos by Scott Hanselman or other Microsoft professionals)
Following are some good C# learning books:
About Rob Miles Snaps
Firstly, I really wanted people to be able to do fun things (like make the computer talk, display graphics, take photographs, play sound effects and so on) right from the start. It turns out that this is rather tricky if you start from scratch, and so I thought some helper classes would be a good idea.
Snaps are an essential element of my “Begin to Code with C#” book, and if you can't get them to work the book text doesn't work very well
Reference: https://www.robmiles.com/journal/category/Snaps
Based on the abovementioned quotes from Rob Miles, I think this book is not a good choice for you. Because using this book, you have to learn two separate things: Learning C# and also Learning Rob Miles SNAP!
NOTE
I do not mean this is a good or bad book in overall. Just in your case, as it is confusing you, I THINK you need to change your learning material, or you might want to spend extra time to learn SNAP beside the C#.
Thanks to @drag-and-drop , if you have decided to learn or explore the SNAP, you can take a look at its GitHub code: https://github.com/CrazyRobMiles/snaps
There is no need to use libraries to simply displaying output in c#. Easiest and mostly used by all dot net/c# developer is Console.Write("test")
or Console.WriteLine("test")
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.