c sharp

  1. S

    Deciding the best approach to refactor some code

    Hi, I'm working on a test and I'm trying to find the best way to refactor the code below. Each case is an Enum and returns a boolean switch (request.PaymentScheme) { case PaymentScheme.Bacs: if (accountRetrieved == null ||...
  2. P

    Question Moving to MudBlazor - Runtime error in page - I can't see MudTextField

    Hello, I'm trying to practice with MudBlazor doing the same I did before without it (but more complex this time, I added the KeyDown event), and it seems something related to the MudTextField is wrong, because it is not shown in the page (the MudButton is) and at the bottom of the screen it says...
  3. L

    Question Can I use a GitHub Library with GNU License in commercial C# software?

    1. Can I use a GitHub Library with the "GNU Lesser General Public License v2.1" license for a commercial computer software? (C#) What I wish to do- Install the library through Nuget Package in Visual Studio Add a reference to a function in that library to perform a specific task Installer of...
  4. C

    How to send email with saved file

    I need some guidance on how to call, invoke or execute when I have a file saved from this: using (TextWriter fn = new StreamWriter(outputDirectory + "\\SomeName" + DateTime.Now.ToString() + ".csv")). ...etc so a file will be generated like this: SomeName08/01/2022: 12:00:00.csv. I want...
  5. T

    Need help with some C# code

    I want to make a c# application that for example pings a server. I have a list of 200+ servers. 10 servers I want to ping every 5 seconds, 50 servers I want to ping every 30seconds and the remaining every 1 minute. All data will be stored in a database. How would I go about in seperating these...
  6. C

    Resolved How Does Visual Studio For macOS See a Namespace That Does Not Exist?

    SANITY CHECK Please accept my apology for a long post. Even though this post is long, to provide context, the question I have is an easy, I think. BACKGROUND For the last 10 years, I worked with native linux servers, php, apache and other non-microsoft technology. Getting back into the MS...
  7. D

    Question persist object data in C# .net core without static keyword or session

    I am trying to make a object that would suppose to persist data like Name, Standard etc. Once I get the data from db i want to store it to object and want to use it application wide, i tried with DI, but data is not persist, it becomes null.
  8. DotNetDeveloper

    How to create PDF document with hierarchical Multilevel List in C#

    How to quickly create a PDF document with hierarchical Multilevel List in C#? PDF document consists of sections. PDFFlow library for C# allows you to create PDF with as many multilevel lists in one section as you need. Creating a list with PDFFlow is only a few lines of code: 1. First you...
  9. dogankemal

    Question How can i disable my C# application proxy server error

    I am using a proxy server on my C# app. If the app is running, the proxy server is active, if app is not running or crashed, I can disable proxy server but some users can shutdown computer without closing my app. When the computer is turned on, then proxy server is active, but my app is not...
  10. F

    Answered How to convert this Visual Basic Code to C#

    Hi group, I would like to write similar code from Visual Basic to C#, this is the code from Visual Basic: For i = 1 To 14 If GroupBox6.Controls("CmbR" & CInt(i)).Text = GroupBox1.Controls("txbCom11" & CInt(i)).Text Then contador_aciertos_1 =...
  11. J

    dll that grabs a window handle and then stops the window from redrawing?

    I have a remote desktop application in which I want to make one of the windows to stop redrawing while it's loading and then to restart the drawing. I was thinking a C# dll project would work but I'm having trouble finding a C# example of this API call. class DrawingControl {...
  12. H

    Answered How to colour a textbox which contain the maximum value of a two-dimensional array?

    I have a two-dimensional array of random integers that are in an array of textboxes. I found the maximum and brought it to Label1. Everything works. But I still need to colour the textbox in which this maximum is located. I had versions, but unsuccessful. Please help, who knows where the error...
  13. N

    How to code for a stop and start of a windows service ?

    Hello, I am new with C# and know just the basics. I would like to create a command line executable where the program can stop and start a windows service through a windows domain account ? Is that possible ? We always get tickets to restart a windows service on a windows server. So, it will...
  14. H

    London-UK: Senior Developer C# - Permanent

    PERMANENT Full-time position Below is an outline job description. If you are interested or have any questions, please email to Angela.Nguyen@virtusllc.com directly Senior Developer - London, United Kingdom Tracking Code 699-171 Job Description IT professional with experience in C# .NET, and...
  15. S

    Question Why My List<string> Saved In User Settings doesn´t Save the strings?

    Good Day, I Have A List<string> Saved In My App User Settings, this List is supposed to save the file paths of a openfiledialog to then deserialize it, but I already Called the method Save(); And even the method Upgrade(); After adding the strings to the list, but this strings, doesn´t save. Why?
  16. N

    Complex C# code

    Not so long ago I moved to the Faculty of Computer Science, lagging behind the classmates and I find it difficult to write this code. If you can help at least partly, I will be very grateful. Here is the task:
  17. S

    Question How to execute access database function?

    Hi all, I have joined today , I am beginner to .net. Importing the csv file to access database using import spec through code , any help I have written function in access database (.mdb file) open access database-database tools-visual basic-created the module (Module name Load) Sub...
  18. G

    Question Cannot Crawl Web Page Data Using ScrapySharp

    Hi all, I am facing a technical issue. I browsed several articles to find the answer but I couldn’t get a proper answer from any web site. I am using ScrapySharp for my project to crawl web page data. This issue came when I try to crawl data from the http://edition.cnn.com/POLITICS website...
  19. H

    Question How to call stored procedure with linq connection string?

    My problem is I use linq with connection string instead of dbml file, so stored procedure don't show in intellisense. Is there any way to call stored procedure with linq connection string? Thanks you!
  20. idontknowbro

    Question Why does my code Write to lines that aren't specified

    I have this code below which is Replace an integer by adding the integer in the file to the integer that the user has input during the console session. It does that fine. However, it seems to increment the other 3 lines, even though the code to do so is not there. Here is my code: using...
Top Bottom