I am currently reading an Algorithm Textbook which is in Java. I have managed to convert two of the requisite libraries from java to c#; however, the third involves setting up a canvas for drawing.
Using visual C#, am I to use winforms/WPF to draw or can I set up a straight C# only way much like java?(I actually do not know if its direct as I am not familiar with java and would rather not learn java just to learn algorithms)
I just want to be able to follow along with this book and complete exercises.
Using book: C# 2010 and .net platform and scavenging the net to learn c# here.
If you were to draw on a canvas in Java, you’d still need to initialize a GUI library of some kind (AWT/Swing/etc). You accomplish this by using either WinForms or WPF. WinForms is less complicated in comparison to WPF to accomplish this specific task. Create a WinForms project and in your Window1 class(or whatever the main window class is named), override the OnPaint method and you will be able to draw directly to the window using the graphic context.