<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for C#</title>
    <link>https://www.codeproject.com</link>
    <description>Latest postings for C# from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for C#</title>
      <url>https://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>https://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2024</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Tue, 23 Jul 2024 21:05:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>HOW TO ANSWER A QUESTION</title>
      <description>Apologies for the shouting but this is important.&lt;br /&gt;
&lt;br /&gt;
When answering a question please:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Read the question carefully&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Understand that English isn't everyone's first language so be lenient of bad spelling and grammar&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. &lt;b&gt;Insults are not welcome&lt;/b&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If the question is inappropriate then click the 'vote to remove message' button&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="ForumSig"&gt;cheers,&lt;br /&gt;
Chris Maunder&lt;br /&gt;
&lt;br /&gt;
The Code Project Co-founder&lt;br /&gt;
Microsoft C++ MVP&lt;/div&gt;</description>
      <author>Chris Maunder</author>
      <link>https://www.codeproject.com/Messages/3117204/HOW-TO-ANSWER-A-QUESTION</link>
      <pubDate>Mon, 13 Jul 2009 08:36:00 GMT</pubDate>
      <guid>3_3117204</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>How to get an answer to your question</title>
      <description>For those new to message boards please try to follow a few simple rules when posting your question.&lt;ol&gt;&lt;li&gt;&lt;b&gt;Choose the correct forum for your message&lt;/b&gt;. Posting a VB.NET question in the C++ forum will end in tears.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Be specific!&lt;/b&gt; Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Keep the subject line brief, but descriptive. eg "File Serialization problem"&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do not remove or empty a message&lt;/b&gt; if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If you are posting source code with your question, place it inside &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt; tags. We advise you also check the "Encode "&amp;lt;" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums. &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;No advertising or soliciting.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;div class="signature"&gt;cheers,&lt;br /&gt;
Chris Maunder&lt;br /&gt;
&lt;br /&gt;
The Code Project Co-founder&lt;br /&gt;
&lt;div class="SmallText"&gt;Microsoft C++ MVP&lt;/div&gt;&lt;/div&gt;</description>
      <author>Chris Maunder</author>
      <link>https://www.codeproject.com/Messages/1278604/How-to-get-an-answer-to-your-question</link>
      <pubDate>Fri, 11 Nov 2005 03:31:00 GMT</pubDate>
      <guid>3_1278604</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>DPI issue when calling C# from C++</title>
      <description>I'm putting this in C# since it's an issue with initializing NET...&lt;br /&gt;
&lt;br /&gt;
I have a WinForm DLL that is written to be DPI-aware. It is called from both C# and C-based executables. There is an intermediate mixed-mode C / CLR / C# DLL between the executable and the Winform DLL that calls from C to Managed C++ to C# to launch the WinForm DLL. Both the C and the C# exe are also DPI-aware (as appropriate for their language) and both display correctly.&lt;br /&gt;
&lt;br /&gt;
Here's the logic flow.&lt;br /&gt;
&lt;br /&gt;
C or C# exe:&lt;br /&gt;
- calls into the intermediate's cdecl entry point using the usual &lt;i&gt;LoadLibrary&lt;/i&gt; / &lt;i&gt;GetProcAddress&lt;/i&gt; mechanism&lt;br /&gt;
&lt;br /&gt;
intermediate mixed-mode DLL:&lt;br /&gt;
- C entry point makes a call to an internal CLR function&lt;br /&gt;
- CLR function marshals the parameters, does a &lt;i&gt;gcnew&lt;/i&gt; on a C# class and calls its single member function&lt;br /&gt;
- C# member function:&lt;br /&gt;
&lt;div class='pre-lang' id='premain35584'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode35584' class='copy-code' data-index='35584' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre35584' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
Assembly targetAssembly = Assembly.Load (File.ReadAllBytes (&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;path to winform dll"&lt;/span&gt;);
Type     startType      = targetAssembly.GetType (&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;startupNameSpace.startupClass"&lt;/span&gt;, &lt;span class="code-keyword"&gt;true&lt;/span&gt;);
&lt;span class="code-keyword"&gt;object&lt;/span&gt;   startLib       = startType.InvokeMember (&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;"&lt;/span&gt;, BindingFlags.CreateInstance, &lt;span class="code-keyword"&gt;null&lt;/span&gt;, &lt;span class="code-keyword"&gt;null&lt;/span&gt;, &lt;span class="code-keyword"&gt;new&lt;/span&gt; object[0]);
startType.InvokeMember (&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;startupMethod"&lt;/span&gt;, BindingFlags.InvokeMethod, &lt;span class="code-keyword"&gt;null&lt;/span&gt;, startLib, &lt;span class="code-keyword"&gt;new&lt;/span&gt; object[] { marshalled parameters } );&lt;/pre&gt;&lt;br /&gt;
WinformDll:&lt;br /&gt;
- &lt;i&gt;startupNamespace.startupClass&lt;/i&gt; is NOT a form, just a plain C# class&lt;br /&gt;
- &lt;i&gt;startupMethod&lt;/i&gt; creates a parameterized thread, sets the apartment state to STA and starts the thread passing the marshalled parameters&lt;br /&gt;
	- the thread instantiates the first WinForm class with the parameters and calls ShowDialog&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, here's the problem.&lt;br /&gt;
&lt;br /&gt;
When run from a C# exe, the DPI logic works correctly. I have a &lt;i&gt;C#exename&lt;/i&gt;.exe.config file in the same directory with the exe that contains a "startup" section with my framework version number and a "System.Windows.Forms.ApplicationConfigurationSection" section containg the &lt;i&gt;DpiAwareness&lt;/i&gt; key with a value of &lt;i&gt;PerMonitorV2&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
When run from a C exe, the WinForm display is incorrect in the exact places where I have my DPI-handling logic. It's obvious from the display that the property &lt;i&gt;DeviceDpi&lt;/i&gt; is incorrect for every form. The research I've done leads me to believe that the .NET environment created to run my winform assembly is missing the dpi awareness flag that is set in the config for the C# exe. I've tried adding a config file with all the different name permuations using the C exe name, the intermediate dll name, the Winform dll name, "exe" and "dll". Nothing is picked up by the NET subsystem that is automatically loaded for me.&lt;br /&gt;
&lt;br /&gt;
So the question is -- how do I force the NET subsystem to see a config that sets the DPI state?&lt;br /&gt;
&lt;br /&gt;
Judy&lt;br /&gt;
&lt;br /&gt;
Also, I have tried the solution to fix an incorrect &lt;i&gt;DeviceDpi&lt;/i&gt; when an exe is first run on a secondary monitor (in the form's OnHandleCreated, call GetDpiForWindow, scale it, resize the form, and send a WM_DPICHANGED with that retrieved dpi). Putting this in the first form displayed does not fix the incorrect display.&lt;br /&gt;
&lt;div class="signature"&gt;Be wary of strong drink. It can make you shoot at tax collectors - and miss.&lt;br /&gt;
&lt;i&gt;Lazarus Long, "Time Enough For Love" by Robert A. Heinlein&lt;/i&gt;&lt;/div&gt;</description>
      <author>JudyL_MD</author>
      <link>https://www.codeproject.com/Messages/6011105/DPI-issue-when-calling-Csharp-from-Cplusplus</link>
      <pubDate>Tue, 23 Jul 2024 21:05:00 GMT</pubDate>
      <guid>3_6011105</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Log file advice?</title>
      <description>I'm writing a program that allows users to send commands to various serial devices.  Most of the commands are "Button" orientated.  By that I mean they press a button and everything is done for them; however I have a textbox that allows them to type in manual commands should there be something I don't have a button for that they really want to happen.  I'm thinking about logging what commands they are typing in order to improve my program so that I can add other buttons that will help make life easier all.  I'm wondering if there's a way to do that possibly on Github so that I can retrieve basically over web. Or if there's a better way to do it?  I'm currently working in Csharp/WPF.  I'm also thinking about logging some try/catch handler errors, so that I can analyze software bugs too, but I'm not too bothered about that right now.</description>
      <author>geomeo123</author>
      <link>https://www.codeproject.com/Messages/6010447/Log-file-advice</link>
      <pubDate>Fri, 19 Jul 2024 01:12:00 GMT</pubDate>
      <guid>3_6010447</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Tables not appearing as classes</title>
      <description>I use Winform and I use Entity Framework to communicate with the database and I use the MSSQL database and when I want to connect the SQL database to the Visual Studio program, the table  Those that exist in my database are not present as classes in the Visual Studio program</description>
      <author>Hesam emami</author>
      <link>https://www.codeproject.com/Messages/6009215/Tables-not-appearing-as-classes</link>
      <pubDate>Wed, 10 Jul 2024 09:17:00 GMT</pubDate>
      <guid>3_6009215</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Print and Print Preview of Web Page not Working Properly in Microsoft Edge Browser</title>
      <description>I have a strange issue I am experiencing with a web app. Typically, the user right clicks on the web page and click Print. He views the document in preview and then decides how to print it.&lt;br /&gt;
&lt;br /&gt;
On Chrome, everything works fine&lt;br /&gt;
&lt;br /&gt;
On Microsoft Edge, It only works if you right click the web page at the top of the page. If you scroll down to the bottom of the page before you right click and select print, the printed document is not formatted properly. The print preview is also not formatted properly. See screen shots below:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;On Chrome - (User right click from bottom of page)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can see the title of the app, title of the report, report run date etc&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://drive.google.com/file/d/1XHNMmFbktph5dU63HaVZEv5RVjVxKOAP/view?usp=sharing"&gt;Report Issue - Chrome.PNG - Google Drive&lt;/a&gt;[&lt;a href="https://drive.google.com/file/d/1XHNMmFbktph5dU63HaVZEv5RVjVxKOAP/view?usp=sharing" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;On MS Edge - (User right click from bottom of page)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The preview starts at some random data as shown below. Title of the app, title of report etc are not shown in the preview and printed version.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://drive.google.com/file/d/1hD2W8J5phvDGU2R--ZQrA62Ran8DP8g6/view?usp=sharing"&gt;Report Issue - MS Edge.PNG - Google Drive&lt;/a&gt;[&lt;a href="https://drive.google.com/file/d/1hD2W8J5phvDGU2R--ZQrA62Ran8DP8g6/view?usp=sharing" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above screen shots, Chrome is displayed properly. MS Edge only displays like that if I right click on the web page from the top of the page without scrolling down&lt;br /&gt;
&lt;br /&gt;
Below is my code sample:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain115386'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode115386' class='copy-code' data-index='115386' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre115386' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;en"&lt;/span&gt;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta http-equiv=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;X-UA-Compatible"&lt;/span&gt; content=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;IE=edge,chrome=1"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta charset=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;utf-8"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;viewport"&lt;/span&gt; content=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;width=device-width, initial-scale=1.0"&lt;/span&gt; /&amp;gt;
    &amp;lt;title&amp;gt;Physician Activity Report&lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;title&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;link rel=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;stylesheet"&lt;/span&gt; href=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;~/lib/bootstrap/dist/css/bootstrap.min.css"&lt;/span&gt; /&amp;gt;
    &amp;lt;link href=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;~/lib/font-awesome/css/all.css"&lt;/span&gt; rel=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;stylesheet"&lt;/span&gt; /&amp;gt;
    &amp;lt;link href=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;~/css/mycss.css"&lt;/span&gt; rel=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;stylesheet"&lt;/span&gt; media=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;print"&lt;/span&gt; /&amp;gt;
&lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;head&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Below is the content of mycss.css&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain677581'&gt;&lt;div&gt;CSS&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode677581' class='copy-code' data-index='677581' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre677581' style='margin-top:0;' class='lang-css' data-language='CSS' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-leadattribute"&gt;@media&lt;/span&gt; &lt;span class="code-leadattribute"&gt;print&lt;/span&gt; {
    &lt;span class="code-attribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-1&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-2&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-3&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-4&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-5&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-6&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt;
    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-7&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-8&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-9&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-10&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-11&lt;/span&gt;&lt;span class="code-leadattribute"&gt;,&lt;/span&gt; &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-12&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;float&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; left&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-12&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 100%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-11&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 91.66666666666666%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-10&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 83.33333333333334%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-9&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 75%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-8&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 66.66666666666666%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-7&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 58.333333333333336%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-6&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 50%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-5&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 41.66666666666667%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-4&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 33.33333333333333%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-3&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 25%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-2&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 16.666666666666664%&lt;/span&gt;;
    }

    &lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;col-md-1&lt;/span&gt; {
        &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 8.333333333333332%&lt;/span&gt;;
    }
&lt;span class="code-leadattribute"&gt;}&lt;/span&gt;

&lt;span class="code-leadattribute"&gt;h5&lt;/span&gt; {
    &lt;span class="code-attribute"&gt;color&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; darkblue&lt;/span&gt;;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
What can I do to get this to work properly on MS Edge ? Is it a CSS issue ?</description>
      <author>Fokwa Divine</author>
      <link>https://www.codeproject.com/Messages/6008372/Print-and-Print-Preview-of-Web-Page-not-Working-Pr</link>
      <pubDate>Wed, 03 Jul 2024 13:54:00 GMT</pubDate>
      <guid>3_6008372</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>multi tcp clients</title>
      <description>Hello everyone,&lt;br /&gt;
I try to connect  a  pc  to some esp32 arudino boards using tcp sockets &lt;br /&gt;
the idea is that on the each esp board  I open a server that accapt the pc( client ) request and  also a client that is used to do all data traffic between the pc and  esp &lt;br /&gt;
the pc  and the board use the some router as AP  i wrote some thing  like that  using  Jyhton &lt;br /&gt;
Now i want to do the some for other project  but on the PC I  run a VS2022 C# program that connect to the esp boards but  i don't know  how to do it  .&lt;br /&gt;
Can someone show me the road ( an example will be great ) &lt;br /&gt;
Regards Doron</description>
      <author>darinka</author>
      <link>https://www.codeproject.com/Messages/6008297/multi-tcp-clients</link>
      <pubDate>Tue, 02 Jul 2024 20:56:00 GMT</pubDate>
      <guid>3_6008297</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>How I write this logic to check if string in a list and also checked ?</title>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I have list checked box has items like "C:\" , "D:\" etc... and each item user can check or not. I need to test if current loop string value (drive) is checked or not in the list box&lt;br /&gt;
&lt;br /&gt;
In addition I want to test "if not" condition for ex like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain47773'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode47773' class='copy-code' data-index='47773' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre47773' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;if&lt;/span&gt; (drive not &lt;span class="code-keyword"&gt;in&lt;/span&gt; chklist_drives.CheckedItems) &lt;span class="code-keyword"&gt;continue&lt;/span&gt;; &lt;/pre&gt;</description>
      <author>Martin Adams 2023</author>
      <link>https://www.codeproject.com/Messages/6007568/How-I-write-this-logic-to-check-if-string-in-a-lis</link>
      <pubDate>Wed, 26 Jun 2024 23:07:00 GMT</pubDate>
      <guid>3_6007568</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Project structure with C# and EfCore</title>
      <description>Hi,&lt;br /&gt;
I'm currently learning how to use Entity Framework Core and I'm trying to create a "more advanced" application divided into multiple projects.&lt;br /&gt;
&lt;br /&gt;
When I was using ADO.NET, I would usually make:&lt;br /&gt;
&lt;br /&gt;
- Project.DatabaseAccess - for managing connection strings,&lt;br /&gt;
- Project.Shared - base classes and interfaces (which implement INotifyPropertyChanged)&lt;br /&gt;
- for example Project.Customers - models for customer-related stuff and a static class with CRUD methods for them.&lt;br /&gt;
&lt;br /&gt;
Customers would then reference the Shared and DatabaseAccess projects.&lt;br /&gt;
&lt;br /&gt;
When using EfCore, I wanted to achieve similar structure, so:&lt;br /&gt;
&lt;br /&gt;
- Project.DatabaseAccess - managing connection strings, main DbContext&lt;br /&gt;
- Project.Shared,&lt;br /&gt;
- Project.Customers - models for customer-related stuff and repositories for them (with DbContext provided in the constructor)&lt;br /&gt;
&lt;br /&gt;
The problem with that approach is that Customers reference to the DatabaseAccess (for accessing DbContext), and DatabaseAccess needs to reference to the Customers (because it has DbSet&amp;lt;customer&amp;gt;). Unfortunately, you can't make A&amp;lt;--&amp;gt;B references in the Visual Studio.&lt;br /&gt;
&lt;br /&gt;
What other project structures do you recommend? I know that there is something called CleanArchitecture (Application, Domain, Infrastructure), but it doesn't provide the separation between different spheres of my program (Project.Customers, Project.Planning, Project.Mailing, etc.)&lt;br /&gt;
&lt;br /&gt;
Thank you in advance!</description>
      <author>nwbkn</author>
      <link>https://www.codeproject.com/Messages/6006494/Project-structure-with-Csharp-and-EfCore</link>
      <pubDate>Thu, 20 Jun 2024 14:54:00 GMT</pubDate>
      <guid>3_6006494</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>C# Newbie, Database Programming</title>
      <description>Hi,&lt;br /&gt;
I have downloaded Visual Studio to write and run C# scripts.&lt;br /&gt;
Can I use Microsoft SQL Manager for free to use with C# to create windows database apps?&lt;br /&gt;
Or do you suggest another free DB to use? or even another app to run C#?&lt;br /&gt;
Basically I want to get my Grand Daughter into programming using C# for, well FREE&lt;br /&gt;
Any suggestions and code examples greatly appreciated.&lt;br /&gt;
Thanks</description>
      <author>JasonParker333</author>
      <link>https://www.codeproject.com/Messages/6006443/Csharp-Newbie-Database-Programming</link>
      <pubDate>Thu, 20 Jun 2024 12:03:00 GMT</pubDate>
      <guid>3_6006443</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Where To Find This DLL</title>
      <description>I'm trying the C# example here:&lt;br /&gt;
&lt;a href="https://learn.microsoft.com/en-us/previous-versions/bb416244(v=msdn.10)?redirectedfrom=MSDN#sample-code"&gt;Changing the Bluetooth Radio Mode | Microsoft Learn&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It's referencing BthUtil.dll. I can't find this DLL anywhere. How can I find this?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;

&lt;div class="signature"&gt;In theory, theory and practice are the same. But in practice, they never are.”&lt;br /&gt;
If it's not broken, fix it until it is.&lt;br /&gt;
Everything makes sense in someone's mind.
&lt;/div&gt;</description>
      <author>Kevin Marois</author>
      <link>https://www.codeproject.com/Messages/6005230/Where-To-Find-This-DLL</link>
      <pubDate>Wed, 12 Jun 2024 03:57:00 GMT</pubDate>
      <guid>3_6005230</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>How to update UI control inside Parallel.ForEach ?</title>
      <description>Hi
&lt;br /&gt;
I am trying to use Parallel.ForEach with ConcurrentBag and it work but to display a feedback I used progessbar control to display fname value , problem after few seconds I get error and the error message is not visible instead a wight box appear because of using a thread . any idea what is the problem in this code ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain623251'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode623251' class='copy-code' data-index='623251' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre623251' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;int&lt;/span&gt; row_idx = &lt;span class="code-digit"&gt;1&lt;/span&gt;;
ConcurrentBag&amp;lt;(&lt;span class="code-keyword"&gt;int&lt;/span&gt;, &lt;span class="code-keyword"&gt;string&lt;/span&gt;, &lt;span class="code-keyword"&gt;float&lt;/span&gt;)&amp;gt; bag = &lt;span class="code-keyword"&gt;new&lt;/span&gt; ConcurrentBag&amp;lt;(&lt;span class="code-keyword"&gt;int&lt;/span&gt;, &lt;span class="code-keyword"&gt;string&lt;/span&gt;, &lt;span class="code-keyword"&gt;float&lt;/span&gt;)&amp;gt;();
Parallel.ForEach(elements, element =&amp;gt;
{

    &lt;span class="code-keyword"&gt;string&lt;/span&gt; fname = element.name;
    &lt;span class="code-keyword"&gt;float&lt;/span&gt; ftrack = (&lt;span class="code-keyword"&gt;float&lt;/span&gt;)(element.track);


    &lt;span class="code-keyword"&gt;var&lt;/span&gt; elementsToAdd = &lt;span class="code-keyword"&gt;new&lt;/span&gt; (&lt;span class="code-keyword"&gt;int&lt;/span&gt;, &lt;span class="code-keyword"&gt;string&lt;/span&gt;, &lt;span class="code-keyword"&gt;float&lt;/span&gt;)[]
    {
        (row_idx, fname, fsize)
    };

    bag.Add(elementsToAdd[0]);

    row_idx++;

    ProgressBar1.Text = fname; &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; &amp;lt;&amp;lt;---- error here&lt;/span&gt;
    ProgressBar1.Update();
    &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Application.DoEvents();&lt;/span&gt;

});
&lt;/pre&gt;</description>
      <author>Martin Adams 2023</author>
      <link>https://www.codeproject.com/Messages/6003807/How-to-update-UI-control-inside-Parallel-ForEach</link>
      <pubDate>Sun, 02 Jun 2024 22:04:00 GMT</pubDate>
      <guid>3_6003807</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Need Help with Optimizing My C# Code for Better Performance</title>
      <description>Hello everyone,&lt;br /&gt;
&lt;br /&gt;
I'm currently working on a C# project that processes a large dataset. While my code works correctly, it's running slower than expected, especially with bigger files. I'm looking for advice on optimizing the performance.&lt;br /&gt;
&lt;br /&gt;
Here’s a brief overview:&lt;br /&gt;
&lt;br /&gt;
-I'm reading data from a CSV file.&lt;br /&gt;
-Processing involves several nested loops and string manipulations.&lt;br /&gt;
-Writing results to a new file.&lt;br /&gt;
&lt;br /&gt;
I've tried using Parallel.For for the loops but it didn't improve much. I suspect the string operations might be the bottleneck. Does anyone have suggestions on more efficient data handling or alternative approaches for processing large datasets in C# ? Any tips on using memory more efficiently or reducing execution time would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance for your help.&lt;br /&gt;
&lt;br /&gt;
Best regards,&lt;br /&gt;
Steve&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;&lt;a href="https://www.igmguru.com/machine-learning-ai/deep-learning-tensorflow-training/"&gt;tensorflow&lt;/a&gt;&lt;/small&gt;</description>
      <author>Steves Smith</author>
      <link>https://www.codeproject.com/Messages/6003494/Need-Help-with-Optimizing-My-Csharp-Code-for-Bette</link>
      <pubDate>Fri, 31 May 2024 11:25:00 GMT</pubDate>
      <guid>3_6003494</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>how to get repository user list and and user group from Azure DevOps</title>
      <description>&lt;div class='pre-lang' id='premain971829'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode971829' class='copy-code' data-index='971829' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre971829' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
how to &lt;span class="code-keyword"&gt;get&lt;/span&gt; repository user list and and user &lt;span class="code-sdkkeyword"&gt;group&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;from&lt;/span&gt; Azure DevOps &lt;/pre&gt;&lt;br /&gt;
&lt;div class="signature"&gt;arjun&lt;/div&gt;</description>
      <author>arjunmca</author>
      <link>https://www.codeproject.com/Messages/6003111/how-to-get-repository-user-list-and-and-user-group</link>
      <pubDate>Wed, 29 May 2024 07:49:00 GMT</pubDate>
      <guid>3_6003111</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>telegram client api to download video files and/or telegram video link</title>
      <description>Hello everyone,&lt;br /&gt;
&lt;br /&gt;
After attempting to create a Telegram project capable of downloading videos either directly sent to the bot or through a Telegram link in the format (https://t.me/channelname/postid), I initially utilized the Telegram Bot API. I managed to fetch updates sent to the bot I created, retrieve the video's file ID and caption, and download the video with the caption as its name. However, I encountered a size limit issue (20 MB).&lt;br /&gt;
&lt;br /&gt;
Subsequently, I learned that another API, the MTProto Telegram API, does not impose a size limit. I created the application and obtained the API ID and API hash. Although I downloaded the "telenet" project, I couldn't find a function specifically for downloading files. Could anybody provide assistance?&lt;br /&gt;
&lt;br /&gt;
I aim to download either video files sent to the bot or videos contained in Telegram links. I'm willing to share my two projects: the Telegram Bot API and the MTProto API.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance.&lt;br /&gt;
Regards</description>
      <author>Tony Germanos</author>
      <link>https://www.codeproject.com/Messages/6002998/telegram-client-api-to-download-video-files-and-or</link>
      <pubDate>Tue, 28 May 2024 16:59:00 GMT</pubDate>
      <guid>3_6002998</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>AD Sync Manager - a free tool to easily monitor and manage your AD to Azure AD sync</title>
      <description>&lt;div class='pre-lang' id='premain663559'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode663559' class='copy-code' data-index='663559' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre663559' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
Hello community! &amp;#128075;
I&lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;m excited to share a free open-source tool I&amp;#39;&lt;/span&gt;ve been working on called AD Sync Manager. If you manage Active Directory and Azure AD synchronization &lt;span class="code-keyword"&gt;in&lt;/span&gt; your environment, &lt;span class="code-keyword"&gt;this&lt;/span&gt; might be useful &lt;span class="code-keyword"&gt;for&lt;/span&gt; you!
https:&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;github.com/TheITApprentice/AD-Sync-Manager&lt;/span&gt;
AD Sync Manager &lt;span class="code-keyword"&gt;is&lt;/span&gt; designed to help streamline and simplify the AD to Azure AD sync process. It provides an easy way to monitor sync status, &lt;span class="code-keyword"&gt;get&lt;/span&gt; alerted on issues, and manage sync cycles.
With &lt;span class="code-keyword"&gt;this&lt;/span&gt; tool, you can:

View the status of your AD Connect sync cycles
Get notified &lt;span class="code-keyword"&gt;if&lt;/span&gt; delta or initial sync fails
Manually trigger full or delta syncs
Analyze sync errors to identify objects with issues
And more!

It&lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;s built with PowerShell so it should be easy to deploy in most AD/Azure environments. I&amp;#39;&lt;/span&gt;m actively developing it and welcome any feedback or suggestions.
If you struggle with keeping your on-prem and cloud directories &lt;span class="code-keyword"&gt;in&lt;/span&gt; sync, give AD Sync Manager a &lt;span class="code-keyword"&gt;try&lt;/span&gt;. Let me know &lt;span class="code-keyword"&gt;if&lt;/span&gt; you have any questions - I&lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;m happy to help!
Hopefully this tool saves you some time and headaches. Let me know what you think! &amp;#128522;&lt;/span&gt;&lt;/pre&gt;</description>
      <author>TheITApprentice</author>
      <link>https://www.codeproject.com/Messages/6002174/AD-Sync-Manager-a-free-tool-to-easily-monitor-and</link>
      <pubDate>Wed, 22 May 2024 04:29:00 GMT</pubDate>
      <guid>3_6002174</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>How to convert XML to text file</title>
      <description>Hello all,&lt;br /&gt;
I am working on on functionality in which i want to write a c# function which will read XML file from folder.&lt;br /&gt;
And it will write .txt file from it and will put it in other folder.&lt;br /&gt;
can some one help me to do this, when i am reading XML file line by line i should able to write any error or log in log file, if some thing is wrong it should rollback all file else generate .txt file.&lt;br /&gt;
Needs to implement it using any design pattern.</description>
      <author>Member 12116052</author>
      <link>https://www.codeproject.com/Messages/6002013/How-to-convert-XML-to-text-file</link>
      <pubDate>Tue, 21 May 2024 05:37:00 GMT</pubDate>
      <guid>3_6002013</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Where to hand over the instance of my plugin dll class to another class</title>
      <description>&lt;div class='pre-lang' id='premain582832'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode582832' class='copy-code' data-index='582832' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre582832' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
MyPluginDllClass
{
  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Fields&lt;/span&gt;
 
  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Properties&lt;/span&gt;
 
  MyClass _myClass {&lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;} = &lt;span class="code-keyword"&gt;new&lt;/span&gt;(&lt;span class="code-keyword"&gt;this&lt;/span&gt;);  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;this does not work !!!&lt;/span&gt;
 
  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Ctor&lt;/span&gt;
  &lt;span class="code-keyword"&gt;public&lt;/span&gt; MyPluginDllClass
  {
	&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;do sth&lt;/span&gt;
  }
  
  &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Member Functions&lt;/span&gt;
  &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; Test1()
  {
		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;do sth&lt;/span&gt;
  }
  
}


&lt;span class="code-keyword"&gt;public&lt;/span&gt; MyClass
{

    MyPluginDllClass _instanceMyPluginDllClass;

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; MyClass(MyPluginDllClass param)
    {

		_instanceMyPluginDllClass = param;

    }
	
	
	&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;Member Functions&lt;/span&gt;
	&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; Test2()
	{
	    _instanceMyPluginDllClass.Test1();
	}

}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
for being able to see all properties in the UI of MyPluginDllClass I would have to instantiate MyClass&lt;br /&gt;
as shown above in the properties area of MyPluginDllClass as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain612799'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode612799' class='copy-code' data-index='612799' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre612799' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
MyClass _myClass {&lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;} = &lt;span class="code-keyword"&gt;new&lt;/span&gt;(&lt;span class="code-keyword"&gt;this&lt;/span&gt;); &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
But this does not work, "this" seems to be unknown at this moment in time.&lt;br /&gt;
&lt;br /&gt;
The goal is to use all member functions and properties of MyPluginDllClass within MyClass and to make all properties of MyClass visible in the property grid of the UI of the main application.&lt;br /&gt;
&lt;br /&gt;
Any Ideas, hints what I am doing wrong or why this is the case.&lt;br /&gt;
I do not have access to the code of the main application.&lt;br /&gt;
MyPluginDllClass ist the interface to the main application.</description>
      <author>AtaChris</author>
      <link>https://www.codeproject.com/Messages/6001728/Where-to-hand-over-the-instance-of-my-plugin-dll-c</link>
      <pubDate>Sat, 18 May 2024 18:34:00 GMT</pubDate>
      <guid>3_6001728</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>Find email-enabled public folders exclusively using "Microsoft.Office.Interop.Outlook"</title>
      <description>Is there a way to exclusively identify email-enabled public folders using Microsoft.Office.Interop.Outlook? EWS or PowerShell should not be used. The program should run on the workstation and utilize the installed Outlook.&lt;br /&gt;
&lt;br /&gt;
Once I've found an email-enabled public folder, I should list the emails contained within it.&lt;br /&gt;
&lt;br /&gt;
So far, I'm encountering difficulties. For instance, I have the following method:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain110183'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode110183' class='copy-code' data-index='110183' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre110183' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; Recursive method for listing the email addresses of email-enabled public folders&lt;/span&gt;
&lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; ListPublicFolders(Outlook.Folder? folder, &lt;span class="code-keyword"&gt;string&lt;/span&gt; indent)
{
    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (folder != &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
    {
        &lt;span class="code-keyword"&gt;foreach&lt;/span&gt; (&lt;span class="code-keyword"&gt;object&lt;/span&gt; obj &lt;span class="code-keyword"&gt;in&lt;/span&gt; folder.Folders)
        {
            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (obj &lt;span class="code-keyword"&gt;is&lt;/span&gt; Outlook.Folder)
            {
                Outlook.Folder? subFolder = obj &lt;span class="code-keyword"&gt;as&lt;/span&gt; Outlook.Folder;

                &lt;span class="code-keyword"&gt;if&lt;/span&gt; (subFolder != &lt;span class="code-keyword"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; subFolder.DefaultItemType == Outlook.OlItemType.olMailItem)
                {
                    Outlook.MAPIFolder? parentFolder = subFolder.Parent &lt;span class="code-keyword"&gt;as&lt;/span&gt; Outlook.MAPIFolder;
                    &lt;span class="code-keyword"&gt;string&lt;/span&gt;              parentName   = parentFolder != &lt;span class="code-keyword"&gt;null&lt;/span&gt; ? parentFolder.Name : &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Parent folder not found"&lt;/span&gt;;

                    Console.WriteLine($&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;{indent}- {subFolder.Name}: {parentName}"&lt;/span&gt;);

                    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (parentFolder != &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
                    {
                        Marshal.ReleaseComObject(parentFolder);
                    }
                }

                ListPublicFolders(subFolder, indent + &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;  "&lt;/span&gt;);

                &lt;span class="code-keyword"&gt;if&lt;/span&gt; (subFolder != &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
                {
                    Marshal.ReleaseComObject(subFolder);
                }
            }
        }
    }
}&lt;/pre&gt;&lt;br /&gt;
The query&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain74118'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode74118' class='copy-code' data-index='74118' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre74118' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;if&lt;/span&gt; (subFolder != &lt;span class="code-keyword"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; subFolder.DefaultItemType == Outlook.OlItemType.olMailItem)&lt;/pre&gt;&lt;br /&gt;
fails because subFolder.DefaultItemType returns the value Outlook.OlItemType.olPostItem, even though the public folder was set up as an email-enabled folder in Exchange.&lt;br /&gt;
&lt;br /&gt;
Specifically, this is in Microsoft 365. In the Exchange admin center, when creating the folder, I explicitly checked the box for "Email-enabled." This action resulted in two additional options: "Delegation" and "Email properties." In "Email properties," I can specify an alias and a display name. By default, both fields are set to "Orders." Now, I expect the public folder to be email-enabled, with the email address orders@domain.tld.&lt;br /&gt;
&lt;br /&gt;
I don't understand why Outlook is treating the folder incorrectly (I can only create posts and not send emails).&lt;br /&gt;
&lt;br /&gt;
Perhaps someone can help me figure this out.&lt;br /&gt;
&lt;br /&gt;
Thank you and best regards,&lt;br /&gt;
&lt;br /&gt;
René</description>
      <author>temuco</author>
      <link>https://www.codeproject.com/Messages/6001115/Find-email-enabled-public-folders-exclusively-usin</link>
      <pubDate>Tue, 14 May 2024 14:25:00 GMT</pubDate>
      <guid>3_6001115</guid>
      <subject>C#</subject>
    </item>
    <item>
      <title>I need to convert a the string of a Text box to a Value</title>
      <description>Hi All,&lt;br /&gt;
Stupid Question time.  If a value is read to a textbox it is a String, to convert it to a value in the past I have done:  &lt;div class='pre-lang' id='premain826478'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode826478' class='copy-code' data-index='826478' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre826478' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
 &lt;span class="code-keyword"&gt;int&lt;/span&gt; Value = &lt;span class="code-digit"&gt;0&lt;/span&gt;;
Value = Convert.ToInt16(textBox1.Text)&lt;/pre&gt;  I'm sure of it and then done maths and operations on  the Value such as:  &lt;div class='pre-lang' id='premain648786'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode648786' class='copy-code' data-index='648786' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre648786' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;if&lt;/span&gt;(Value &amp;gt; &lt;span class="code-digit"&gt;1000&lt;/span&gt;) 
{
 MessageBox.Show(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Here!"&lt;/span&gt;);
}&lt;/pre&gt;  But it won't run in VS2022 it returns a System.Format.Exception error.  What have I done?&lt;br /&gt;
Glenn</description>
      <author>glennPattonWork3</author>
      <link>https://www.codeproject.com/Messages/6000383/I-need-to-convert-a-the-string-of-a-Text-box-to-a</link>
      <pubDate>Thu, 09 May 2024 14:19:00 GMT</pubDate>
      <guid>3_6000383</guid>
      <subject>C#</subject>
    </item>
  </channel>
</rss>