c# .net

  1. MetaGota

    Winforms C# Read random line from Pastebin

    Hello, I'm trying to find a way to read a random line from a Pastebin WebClient WC = new WebClient(); List<string> TEST = new List<string>(); Random Rand = new Random(); StreamReader testReader = new StreamReader(WC.DownloadString("Pastebin"))...
  2. DrDress

    Question Threadpool

    I'm not sure about Threadpool. It says thar there are about 1000 available threads. But I once made a program where I put about 100 job in the queue. When I monitored the job it was clear that precisly 8 jobs whete beeing processed at a time. This is bad in my current project where I spawn...
  3. E

    Resolved What the following code does?

    Resolved
  4. PJ33

    how to read library documentation-Math.NET ?

    Hello I am new in C# and I try to understand on how to read the documentation of libraries and implement it. Here an example from https://numerics.mathdotnet.com/ is shown: using System; using MathNet.Numerics; using MathNet.Numerics.LinearAlgebra; class Program { static void...
  5. M

    How to Bind FontSize of a TextBlock from two different sources in WPF?

    Due to design purpose I use the fluid Layout which is mainly made by Grid.Row definition. I want to adjust my WPF application to run smoothly on every monitor that's why I use the DPI Decorator class. And this DPI Decorator is perfectly working that means the screen UI components are perfectly...
  6. C

    Question How to serialize to xml return type

    Hello Everyone, I have below models and i need the return xml response like below. Here how to do this. please help me public class School { public List<Student> StudentList; public int? SchoolID { get; set; } public int? SchoolName { get; set; } } public class...
  7. FyMa2618

    How to check for Keyboard Input.

    Good day, i develope a plugin whit C# and beepinex in Visual studio. And i am want to check if ... key is pressed, i searched allot about this theme but i found nothink what can i do? using UnityEngine; using System.Collections; using BepInEx; using HarmonyLib; namespace SetOwnValues {...
  8. Sriram Surampudi

    Question How to open popup window and redirect to another page

    I have a situation, when I click on a button, I need to open a URL in browser's pop-up window and then redirect the current page to another page using C#. But when I click on the button, I am not seeing the pop-up window but page is redirecting based on the condition. To open the popup window I...
  9. Siwar Ha

    uploading files to Google drive with windows service

    I m writhing a program that moves files from one place to another and if everything is fine a copy of those files are sent .zip to google drive . the code is working fine with console application : files are placed in the destination and uploaded to google drive . BUT when i run it as windows...
  10. Arad

    state.sb.Clear() malfunctions sometimes?

    I am just getting started with C# , i am experimenting with a socket server , socket server is receiving a string from a client application. this is the string that is being received by the server : This is the Code that is receiving the data from client : public static void...
  11. C

    Resolved HttpClient Response IsSuccessStatusCode firing twice?

    I have the following code and I cannot for the life of my answer why it is firing twice.... HttpClient httpClient = new HttpClient(); HttpRequestMessage request = new HttpRequestMessage(); request.RequestUri = new Uri(shortUrl); request.Method = HttpMethod.Get; request.Headers.Add("Key", api)...
  12. J

    Architecture question

    We have developed a system, written in c#: There are physical electronic controllers that have ethernet adapters. They communicate to the socket server over UDP which is writtren in c# (.net 4.8) as a dll with a winforms application on the front. There is a web based front end written in CoreASP...
  13. mrlowbot

    Beginner problems....

    Hey. I need some help when it comes to my code, its not meant to have a "main" method. It is basically a chess program that takes values and compares them, checks players and how much they score. This is what i need to do : We organize a chess tournament in the local club. The members are...
  14. matitdob

    C# EventLogSession Local Admin

    I have a problem how to use the code below for the admin of the local remote computer. Typing ".", "" Or "computer name" as domain doesn't help. The omission results in a syntax error. EventLogSession session = new EventLogSession( "ComputerName", // Remote Computer "Domain"...
  15. M

    I need help with executing second project

    Hello i need help, i am new with C# could someone help me with executing second project Console application after clicking on button without this full way C:\Users\sajmo\source\repos\VoidSharp\VoidSharp ? screenshot: Screenshot
  16. SaeedP

    why am I getting: "HTTP Error 500.30 error" when publishing the Blazor server-side site?

    Hello, I've made my web app on Blazor server-side and I'm trying to publish it on a windows server. I tried different methods to publish but all came to the same conclusion. HTTP Error 500.30 - ANCM In-Process Start Failure Why am I having this problem? You can see the result on...
  17. cpeye1987

    Sr Developer- C#, .NET, SQL, Java, Angular JS - REMOTE- 115K

    Sr Developer- C#, .NET, SQL, HTML, Java, Angular - REMOTE- 115K The Position: Developing software solutions by analyzing business needs by users and data. Primary responsibility is to develop tightly aligned business strategy and capabilities as it relates to architecting and building...
  18. M

    XML serialisaton. Error: XmlException: Root element is missing.

    Hi all. I am making a game like minecraft. I need to keep the world when the player exits the game. Chunk (it is a place 16 by 16 blocks) and world contain a lot datas, that don't serialize can. so i have created classes WorldData and ChunkData, that contain only serializable varibles. But i...
  19. R

    Question why am i getting insufficient parameters supplied to the command error

    i have trying to read a database and display it into a datagridview but i keep getting the error private void nameSearch() { using (SQLiteCommand cmd = connAccount.CreateCommand()) { connAccount.Open(); try { connAccount = new...
  20. L

    Graphics overlap avoiding transparence

    Hi, I have a problem drawing in a PictureBox. To summarize and make an example: imagine you have to draw a rectangle at 0, 0 and it's 100x100 pixels; then you have to draw another rectangle 10x10 at the center (which should be at 45, 45 if i'm not mistaken) but the result shall be simply the...
Top Bottom