C-Sharp

Entries for: C-Sharp!
^Top
<< Back
Mobile-Menu










Sub Categories

Networking

Get Remote HTML Code as String

Views: 746
Created: 2020-11-22 17:58:28
Modified: 2023-09-23 16:38:18

Here is an example function to get the full html output code of an URL provided to the function into a string.<br /> You can get the data by using a string variable which gets the output: string variable = gethtmlcontent(&quot;https://thisisapage&quot;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...

Hints

Add Colored Text To RichTextBox

Views: 620
Created: 2020-09-24 07:38:02
Modified: 2023-09-22 13:49:08

You can add this function to display colored text in a richtextbox! [Just Append With that Function] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void AddTextToRTB(RichTextBox rtb, string txt, Color col)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br /> &nbsp;&...

Allow Application Run Only Once

Views: 631
Created: 2020-11-22 17:44:49
Modified: 2023-09-22 22:31:01

Here is an example to allow software to run only once on a machine.<br /> If the user tries to start the application again, there will ne a notification box and the program will exit. [file] program.cs in visual studio using System;<br /> using System.Threading;<br /> using System.Windows.Forms; namespace myapplicationnamespace<...

Get the current Directory

Views: 713
Created: 2020-08-25 19:25:09
Modified: 2023-09-24 18:09:50

&nbsp;Here the code to get the current Directory! string path = Directory.GetCurrentDirectory(); <br /> See more detailed Info here:<br /> https://docs.microsoft.com/de-de/dotnet/api/system.io.directory.getcurrentdirectory?view=netcore-3.1 &nbsp; &nbsp; ...

Load an XML exe.config File (Custom Path)

Views: 615
Created: 2020-09-24 07:36:29
Modified: 2023-09-25 01:15:08

Here an example to load an custom application xml config file. // Load Configuration<br /> CurrentConfPath = &quot;C:\\PATH\\TO\\EXE.CONFIG&quot;;<br /> ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();<br /> configMap.ExeConfigFilename = CurrentConfPath;<br /> Configuration config = ConfigurationMan...

Prepare Scripts for SSL Connections

Views: 652
Created: 2020-09-24 07:34:46
Modified: 2023-09-24 15:59:57

If SSL Connections fail with Security Protocol Error, this code in Main Function could do the trick! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a...



Warning: Array to string conversion in /home/bugfish/public_html/_site/btm/init.php on line 82
Switches: 0 | Arrivals: 0 | Visits: 0
This Website is using Session Cookies for Site Functionality.