Category:C#

  • Summary of c-mail (SMTP) and outlook.com account

    Time:2019-12-9

    This is a technical note about C ා sending email (SMTP), which is presented in the form of “briefing”. Because I successfully sent an email through outlook.com, I think it’s still necessary to record the main points. I. technical core Two classes provided by. Net framework: smtpclient and MailAddress The former is responsible for connecting […]

  • Detailed explanation of RSA encryption and decryption in C

    Time:2019-12-9

    1. RSA encryption and decryption — use public key encryption and private key decryption public class RSATool { public string Encrypt(string strText, string strPublicKey) { RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.FromXmlString(strPublicKey); byte[] byteText = Encoding.UTF8.GetBytes(strText); byte[] byteEntry = rsa.Encrypt(byteText, false); return Convert.ToBase64String(byteEntry); } public string Decrypt(string strEntryText,string strPrivateKey) { RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.FromXmlString(strPrivateKey); […]

  • Collection: the SQL server code generator, which has been developed independently for a long time, is open source (. Net WinForm)

    Time:2019-12-9

    Hello everyone, I haven’t seen you for a year. My technology has made amazing progress. So I come to share the technology for you. What I bring to you today is the old tools developed a long time ago to share with you. I believe that everyone has used the code generator, how many are […]

  • C# extract multiples from web pages based on OpenQA.Selenium.Chrome and ChromeDriver

    Time:2019-12-8

    1.Install latest Chrome,Selenium.WebDriver, ChromeDriver Selenium.WebDriver 3.141.0; Selenium.WebDriver.ChromeDriver 78.0.3904.7000; Google Chrome Version 78.0.3904.70 (Official Build) (64-bit);   2. using OpenQA.Selenium.Chrome; using OpenQA.Selenium; using System.Reflection; static void WebDriverDemo(string url = “http://www.tieba.com/p/4325046994#!/l/p1”) { ChromeDriver driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); driver.Navigate().GoToUrl(url); List lwe = driver.FindElements(By.CssSelector(“img”)).ToList(); List imgsList = new List(); StringBuilder imgBuilder = new StringBuilder(); foreach(var img in lwe) { string imgUrl = […]

  • An example analysis of C ා date format string conversion

    Time:2019-12-8

    In this paper, an example is given to illustrate the conversion operation of C ා date format strings. To share with you for your reference, as follows: Method 1: convert.todatetime (string) String format is required, it must be yyyy MM DD HH: mm: SS Method 2: convert.todatetime (string, iformatprovider) DateTime dt; DateTimeFormatInfo dtFormat = new […]

  • Use of page tab control xtatabcontrol control in devxpress

    Time:2019-12-8

    scene WinForm control – devexpress18 download installation registration and use in vs: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100061243 On the premise that devxpress has been successfully installed above, the page layout effect is tab page effect, as follows:     Note: Blog home page:https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public addressDomineering procedural apeGet programming related ebooks, tutorials and free downloads. Realization […]

  • Multithreading and asynchrony based on C

    Time:2019-12-7

    1. Basic concepts Multithreading and asynchrony are two different concepts. The reason why they are put together to learn is that although they are different, they also have some connections. Multithreading is a technical concept. Compared with single thread, multithreading is the simultaneous processing logic of multiple single threads. For example, if a person mentions […]

  • How to read TXT big data and update it to database

    Time:2019-12-7

    Environmental Science Sqlserver 2016  .net 4.5.2  At present, the test data is 13 million about 3-4 minutes. (to limit the number of reads and threads at a time is to save server resources. If the server is too large, other applications may not be able to run). Sqlserverdbhelper is a database help class. There is […]

  • How to add, delete, move up and move down a row in DataGridView

    Time:2019-12-7

    scene In WinForm, DataGridView is used to add a row, delete a row, move up a row, and move down a row. Note: Blog home page:https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public addressDomineering procedural apeGet programming related ebooks, tutorials and free downloads. Realization Add a row private void TaskViewEditHelper_OnAddStep(object sender, EventArgs e) { DataGridViewRow dr = […]

  • ZedGraph tutorial and resource summary in WinForm (with resource download)

    Time:2019-12-6

    scene In C ා form application, use ZedGraph curve plug-in to draw chart: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/99716066 In winforn, set the properties of ZedGraph curve, coordinate axis and scale: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100112573 In WinForm, the function of restoring ZedGraph after zooming is realized https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100114576 In WinForm, the curve in ZedGraph can be displayed in Chinese by right clicking: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100115292 In […]

  • C ා detailed explanation of the memo of calling C + + function through Pinvoke

    Time:2019-12-6

    It is known that the called C / C + + function can only be a global function and cannot call a member method in a class The called C function must be included with extern “C” to ensure that the generation rule of the exported function name is consistent with that of. Net The […]

  • Get and set the currently selected row in DataGridView, as well as the attention distinction between selectedrows and currentrow

    Time:2019-12-6

    scene How can DataGridView add, delete, move up and move down a row https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/102814145 In the above, it is applied to get and set the selected row row and encounter the problem of distinguishing it from the current row. Note: Blog home page:https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public addressDomineering procedural apeGet programming related ebooks, tutorials […]