csharp

  1. Z

    Memory Stream With Large Files

    Dears, Is there any way to put a large file into a memory stream with file with size > 1 GB. knowing thar Read(byte[] buffer , int offset, int count) does not work in large files.
  2. L

    I made a password generator and I think my code isn´t the best readable. Are there any better ways to do it?

    This is just the UI. The logic is fine. static void Main(string[] args) { Console.WriteLine("This is a passwordgenerator."); Console.WriteLine("Enter the length of your password (12 signs recommended): "); int length; try {...
  3. D

    Resolved Runtime Message Issued Error : Found;

    Hello CSharp | C# Developer Community [^] found a runtime message issue Operator '<' cannot be applied to operands of type 'int' and 'object[]' if(MyVariable.GetType()==typeof(System.Boolean)&& MyVariable==false) return; line 1 had to be added and there where no where to be found the...
  4. dqurve

    Question Display and Drawing custom shape on pdf file

    I've been researching how I could open and display a PDF in WPF, and once it's open, draw on top of it. I have 2 panels, 1 that simulates the Treeview of the pdfs that I am opening and the other panel is where it is displayed, something like the one in the image, obviously it does not have...
  5. M

    Resolved How to find an alphanumeric substring

    This is a trivial problem but I cannot get a solution. I am trying to make my code recognize strings like the following: "PTV1_3000", "ITV3_4000" The sub-string should contain a root-like "PTV", "ITV", "CTV" followed by one or more integer numbers followed by "_". I tried different flavors of...
  6. tokechu

    Fully crossplatform C# plotting library

    Basically, I need a plotting library with support of exporting as image that does not utilize System.Drawing.* namespaces, as they are going to be marked as "Windows-only" in .NET 7 (see the link Breaking change: System.Drawing.Common only supported on Windows - .NET). I have already checked...
  7. L

    C# blazor await function to get property

    I am programming a C# blazor game, and there is a method that sets a property in a class. If the button, which calls the method was clicked, on the next page the property will be printed. Here is a simplified example: class A{ public string test {get; set;} } class B{ public void...
  8. maddyrafi

    Password case sensitive

    Sir, I save my password in database is SAAmi@123 but if even enter in small letters saami@123 means its also logging in but it was not correct. please correct in my code pls if (textBox9.Text != "" && textBox10.Text != "") { string connectionString; MySqlConnection cnn; connectionString =...
  9. M

    Resolved ListBox whose items can be edited / discarded /accepted

    I would appreciate some help in implementing the following with WPF. I need to have a ListBox displaying a list of strings but some may be empty strings. Each ListBox item can be edited, discarded, or accepted. Therefore, besides the editable ListBox I need some other type of WPF control that...
  10. L

    How to lock TicTacToe matchfield after a player won?

    I am actually programming a tic tac toe game with the blazor framework and I have already a function to lock the button if it was clicked. It looks like this: public class ElementOfMatchField { public int Row { get; set; } public int Column { get; set; } public...
  11. T

    Save Outlook email Information to SQL Server

    I'm trying to save inbound Outlook mail data to sql server however I'm getting in error in System.Runtime.InteropServices.COMException: 'The attempted operation failed. An object could not be found.' What did I missed Note: RetrieveMail is exist in mailbox using System; using...
  12. L

    Blazor Server Side Web Application with authorization?

    I have a Blazor Server Side Web Application that uses the default authorization and authentication. app.UseAuthentication() app.UseAuthorization() I can protect my pages with @attribute [Authorize] I have a login page with anonymous access to authenticate. This works fine. Now I need a...
  13. M

    Question How to generate a self-contained .exe that can be run from other PCs

    Dear C# Experts, First off, please forgive me to ask basic, maybe silly questions. I am a C# beginner. I developed a C# script (attached) that gets access to a Postgres database, the Velocity database, ConsoleX (available from GitHub), and some fuzzy string search algorithms. Therefore my code...
  14. Taiizor

    FYI .NET WinForms UI/UX Component Library

    Welcome to ReaLTaiizor ReaLTaiizor is a UI/UX component library. It allows you to make modern designs using the various components it offers. Usage Step 1:Add a reference to ReaLTaiizor or search for ReaLTaiizor on the NuGet; Install-Package ReaLTaiizor Step 2:Enjoy designing Examples...
  15. msaaaddev

    Question Can software in different cities uses the same database to store data?

    Hello Friends, I want to ask that can software in different cities uses the same database to store data. I am new to c#. I want to know if I develop software in c# and then install it in different cities(branches) of same company can I use the same database for all running software in different...
  16. C

    C# Generic collections - Get list of sub level child items from parent object

    Public class viewmodel { public string ID {get;set;} public String name{get;set;} public List<child1>{get;set;} } public class child1 { public string C1ID {get;set;} public String C1name{get;set;} public List<child2>{get;set;} } public...
  17. AndreasPapandreou

    Question Randomized Playlist

    Hello i am new to c# and trying to create some simple programs and one of those is a randomized playlist for spotify. When I run the code I get this error: "Unhandled exception. System.ArgumentOutOfRangeException: Index must be within the bounds of the List. (Parameter 'index') at...
  18. C

    Azure Event Grid publish EventGridTopicEvent

    HI All, I have scenario where I need to publish "EventGridTopicEvent" data and at the same time I need to store this event information in the Azure Storage Table. I would like to know is there any way to get the information(like T/F) if Publish event successfully done or not(any error), If it...
  19. SiamIT

    Adding Preview Support In File Open Dialogue

    Greetings.. after some search on google, i found that i can use Microsoft.WindowsAPICodePack.Shell to add custom controls on file open/save dialogue box as needed. so, i tried some, but i can't make it work to solve my purpose. I have added a button to preview music. But it throws a...
  20. W

    There is any way to import correctly optional parameters of wsdl

    i'm using a third party web service with C# without problem until now. The wsdl is added to connected services adding a service reference to: https://serviciosjava.afip.gob.ar/wsfecred/FECredService?wsdl The problem appears with optionals parameters. For example, the consultarComprobantes...
Top Bottom