Hi all. I am making a game like minecraft. I need to keep the world when the player exits the game. Chunk (it is a place 16 by 16 blocks) and world contain a lot datas, that don't serialize can. so i have created classes WorldData and ChunkData, that contain only serializable varibles. But i...
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...
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...
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...
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()...
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...
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...
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...
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...
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 =...
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?
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...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.