csharp

  1. Programmable Physics

    only 1 instance of a form to exist while it has a parent form?

    I have a form application that when clicking a menustrip button, it opens an instance of a form. I made this newly opened form a child of other form to make the newly opened form(child) to stay in the borders of this(parent) form. I used form.MdiParent so newly opened form has a parent. If I...
  2. R

    Resolved IText Empty PDF

    Hello, I am working on a Blazor Server application. I am trying to create and download PDFs as follows. PDF opens in a new browser tab but unfortunately, it is empty. What is wrong with my code? Could you please help? private async Task ReportPDF() { var memoryStream = new...
  3. S

    Question Is it possible to write json in c#

    I'm trying to create a c# framework and a necessity I need is the ability to write with json in C# and if I can how can I go about doing so.
  4. A

    when make login using simple membership it not logged in success although I use same user name and password?

    I work on Web API c# web app . I face issue I can't login success although I have same username and password . when make break point on websecurity.login then trace it jump to ModelState.AddModelError so are there are any settings remaining or some configuration not done . public JsonResult...
  5. Programmable Physics

    Dragging an item from listBox1 and droping the item into listBox2 code does not work(AllowDrop=true)

    Although both of the listBoxes **AllowDrop=true** listBox2 does not allow me to drop an item from listbox1 into listBox2. VS 2022 does not give any error, warning or exception handling problem. The problem is that this code does not do what it supposed to do. It does not let me carry 1 item...
  6. MonsterMMORPG

    My C# and ASP.NET Core MVC Lecture Videos

    Hello everyone. My name is Furkan Gözükara. I am a Ph.D. computer engineer from Turkey. I have a software engineering dedicated Youtube channel named: SECourses : https://www.youtube.com/SECourses I want to share a few of my lecture playlists. The playlists contain the full course for free...
  7. 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...
  8. 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")...
  9. 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...
  10. 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...
  11. Milan

    How To Convert a Sketch to a Text'

    I want to Convert a Sketch to a Text
  12. 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"...
  13. 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...
  14. 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.
  15. 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 {...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Back
Top Bottom