Several C # Tips (1)

zhaozj2021-02-16  98

Tips 1AppDomain.currentDomain.basedirectory equivalent to app.path

Skill 2 If you need to increase the transportation in the end of the string, it should be: s = s "/ r / n"; rather than: s = s "/ n / r"; order will affect S in TextBox .

Tips 3 In C #, there are some classes that provide a static method, which can directly call their methods without instantification, just like global functions. Such classes include: Application, File, MessageBox, DialogResult, and more. For example: b = file.exists (filepath);

Tips 4C # do not have a BEEP statement like VB.

Skills 5 are no longer ListBox.style, but another Control: CheckedListBox.

Tips 6DATYPE OF Datacolumndatacolumn DCID; DCID.DATATYPE = System.Type.gettype ("System.String");

转载请注明原文地址:https://www.9cbs.com/read-10593.html

New Post(0)