c# .net

  1. 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...
  2. 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...
  3. Knetterpie

    Question Bestellungsdaten in Konstruktor Speichern und ihn Abfragen

    Hi, Ich möchte meine eingegebene Werte in einem Konstruktor Speichern, und diesen dann je nach Nummer der Bestellung abfragen. Das Problem: Ich habe bereits den Konstruktor angelegt, die eingegebenen Werte werden auch gespeichert und ich kann sie auch ausgeben. Aber leider weiß ich nun nicht wie...
  4. pampua84

    Algorithm to generate secure number of fixed lenght with RNGCryptoServiceProvider

    Hi guys, I'm looking for an algorithm to generate a safe random number like an OTP and I found this code on the web: const int min = 100000; const int max = 999999; const int elemInRange = max - min + 1; var randomData = new byte[4]; using var rng = new RNGCryptoServiceProvider()...
  5. Kevin91

    Question Converting Celsius degrees to Fahrenheit degrees using switch

    I'm a beginner c# programmer trying to program a simple app that shows a menu to the user. When option 1 is selected by the user at run-time, the program lists values from 0 to 100 Celsius degrees converted to Fahrenheit degrees. When option 2 is chosen, the program calculates and displays a...
  6. Kevin91

    Resolved method to sum up numbers between two numbers

    I am a beginner in C# programming and trying to code a function that sums up all numbers from the start to the end and If the start number is greater than the end number, the function swap the values so that the start number becomes the end number and the end number gets the value of...
  7. K

    Resolved JSON to a ListBox not displaying correctly

    OK so two things going on here. First I am getting this when the ListBox items gets added. "OK - System.Collections.Generic.List`1[System.String] - System.Collections.Generic.List`1[ClassLibraryApi.Report]" Other times it loads nothing and this is the exception it pulls...
  8. M

    How to Scale WPF application according to screen resolution?

    I make a WPF application in .Net Framework 4.7. I developed this application on my Laptop which has full HD resolution (1920*1080). My problem is when I run my application on a low resolution monitor (1366*768), my application don't scale up according to the screen resolution. I tried using Per...
  9. Dragon4ik

    Resolved CustomAttribute doesn't work

    Hi, everybody! I try to create attribute, which would validate a string format for parsing into DateTimeOffset. Here is DateStringAttribute code: public class DateStringAttribute : ValidationAttribute { public override bool IsValid(object value) { string date =...
  10. sebi25

    Question Can I make a play music command from youtube on dsharpplus?

    Hi! I am making a discord bot using DSharpPlus. I want to make a command which will play music directly from youtube through a link. Can somebody help me with how I can make that, giving me tips, please?
  11. Kontorta

    Question Execute Suggested Action Bug

    Hello guys. I want to add a Reference in the class library, but it's been stuck here for how long. Is there a method? project .net core
  12. M

    Referencing a property from an object range in a for each within a nested for each

    I've created a list of instances of an object, to give sample data. I've then created a list of IGrouping, containing the objects. Within the foreach, I'm then trying to give an ordering number for the objects within their respective groups (this for each only assigns a value where the value...
  13. Kontorta

    Question form application map help

    Hello guys. My project is this: I will show historical events between 1720 and 1900 on the map and when an event is clicked, the map will take according to the future of that day. Whichever historical event they click on, the map will take shape according to that moment and I will list the...
  14. hamstergeek

    Custom result chipertext, Encryption using AES algorithm

    Hi folks, is it possible to customize the results of the encryption text using this aes algorithm. I have an encryption case how to do a conversion from string to digit string as an example plaintext: "KSJJ12BK1J2B4KJBSFDJB" chipertext: "001238912389" i want the ciphertext to be a string only...
  15. vlad.ua96

    Question Incorect ML Time Series forecasting with big values RRS feed

    Hey there) Was making very simple stock prediction app (Simple Colege Project). For feracast i used Microsoft ML Time Series Model. It worked good but i noticed when i make predictions for data with big values like 1700 or 3800 it makes very incorrect predictions. For instance if csv file has...
  16. Sachin Patil

    Question Read and Write range with existing data format in excel?

    I am trying to read range from excel and writing or appending in another sheet using Microsoft.Office.Interop.Excel in c#. While writing or appending data existing data format is not copy like number, text, currency and date etc. If data type is currency then it convert into text or general...
  17. vlad.ua96

    Question IO Doesnt work on x64 or on x86 configaration only on Any CPU RRS feed

    Hello) Recently i got very strange error with IO i noticed that when i change project configuration from Any CPU to x64 or x86 input output stop working. I can't create any files even this simple code not working. File.WriteAllText(@"CSVTEST.csv","test"); I was thinking to change...
  18. Shane_Nicholson

    Adding equation formula to textbox.

    Good evening all, First of all, thank you in advance for taking the time to read my request. I am really struggling with the following issue. I have created a windows form using c#. The form consists of a number of text boxes that my users will insert numbers into. Eg: -200, 100 and so on...
  19. R

    Answered need help with a windows forms app game

    so i created a basic game and it has a level that is basically space invaders. i have a class for the bad guys, and a class for the bullets, but sometimes i have an issue in game where the bullet just goes straight through the enemy rather than actually hitting it. this doesnt happen all the...
  20. A

    Resolved Procedure or function sp_updateItems has too many arguments specified.

    I want to update the price of items in the database. I am extracting a list of items from another list( of class type having other information also). After that I am sending it(item number) one by one as a stored procedure parameter to get the price updated. But I am getting a Procedure or...
Back
Top Bottom