Programming/C#(5)
-
[C#] Import dll file in client side, Interface
Import dll file in client side 1. How to add user control by code How to import dll file: Add References Using statements allow us not to use fully qualified name using ClassLibraryApplication; ... // fully qualified name ClassLibraryApplication.WorldClock worldClock = new ClassLibraryApplication.WorldClock(); // by Using using statement you don't have to use WorldClock worldClock = new WorldClo..
2021.10.18 -
[C#] MenuStrip, SaveFileDialog, OpenFileDialog, PcitureBox, Class Library (.NET Framework) + Custom Control
1. MenuStrip Shortcut using Alt: “&Save” = Save (Alt + S) → Navigating with keyboard Shortcut using Ctrl: ShortcutKeys Property 2. SaveFileDialog OpenDialogbox, SaveDialogBox just pass file path FileFormat is important! è filename always include Filepath Always surround dialog with try-catch private void saveToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult dialogResult = dlgSav..
2021.10.16 -
[C#] Inheritance, Polymorphism, Abstraction
Goal Learn how to use Inheritance and P olymorphism Demo PolymorphismApp - Get Area of Rectangles and Circles, and Show a message box for the total of the area Summary Design with inheritance and polymorphism, then you can get more effective code from time to time. Basic UI Design Version 1. No Inheritance, No Polymorphism JYPolymorphism.cs using System; using System.Collections.Generic; using S..
2021.10.08 -
[C#] Inheritance, Object-Oriented-Programming, Polymorphism
Requirements. Create Horse Race using Class, Inheritance, Polymorphism Start Horse Race Automatically Delete Horse after each race finish If a user click Show button, then show Horse Race Result in the MessageBox Each Horse Race Result is managed separately for each Horse Race Each Horse has each own timer JYHorseRace.cs Form Designer 1. Declare constants and class variables JYHorseRace.cs Form ..
2021.10.03 -
[C#] Collection, Inheritance (Feat. base keyword)
Collections 1. Collection classes are defined in namespaces - System.Collections ð Not automatically included - System.Collections.Generic ð Automatically included 2. ArrayList can hold every datatype ð But the cost is type casting, every time we retrieve elements in ArrayList we should check datatype ð Generic version(List) is more Inheritance SuperClass : BaseClass SubClass : DerivedClass Pare..
2021.10.02