csharp

  1. R

    c# and .Net Target on Target Systems

    Hello all, I have a little understanding problem with my small C# projects and .Net. If I created a project and set as target .Net 4.8, then on a target machine to which I copy all the files \bin\debug\* must be installed on the .Net 4.8 version? The same goes for the DLL references for...
  2. A

    Question Error object reference not set to an instance of an object

    I work on csharp i get error object reference not set to an instance of an object code give me error var Data = result.items.Select(e => new { PartID = e.create._id, IsUpdated = e.create.error != null && e.create.error.reason !=null && !e.create.error.reason.Contains("document already exists")...
  3. TB007

    Question Why is my view not updating after Add/Delete operations on database?

    I have a fairly simple WPF app which primarily has 2 datagrid's in two different tabitem's. The datagrid in 1st tabitem has the itemssource PendingBills which is an ICollectionView and it shows some filtered data as per some basic logic The datagrid in 2nd tabitem has the itemssource AllBills...
  4. S

    Question Xaml layout problem

    Hi everyone, I'm making a window, the first image you see is the visual studio editor, the second the program started, but why the heck it destroys the whole layout .. I can't understand if it's a problem with the size of the objects , many are not even displayed 😭 <Window...
  5. Milan

    How To Convert a Sketch to a Text'

    I want to Convert a Sketch to a Text
  6. TrucBidule

    How work and be able to run a function in real time?

    (I USE .NET 5.0) So, i created a post on StackOverFlow but they closed my question due to not have enough braincells. You can see the comment you can have a question already awnsered here: How work and be able to run a function in real time? So i start project that's need real time "update"...
  7. SamueDexterAYG

    Resolved How to transfer a specific listview column items to a listbox in C#

    Hello everyone. I will be grateful for your kind help on this one. I am trying to transfer a specific listview column items to a listbox in C#. Heres my effort below. Unfortunately my code rather iterates though only the entry of the specified column and splits it as letters into the listbox...
  8. 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.
  9. 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 {...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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 =...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Back
Top Bottom