All Questions
30 questions with no answers
0
votes
0
answers
80
views
C# array of string not nullable but init with null string[] arrayOfString = new string[2];
Working with VS2022 and .NET 8 with <Nullable>Enabled</Nullable> for my project.
I encounter null pointer exception at run time with the following code:
string[] arrayOfString = new string[...
0
votes
0
answers
50
views
How to get a string[] as value from a Dictionary<int, string[]> regroup all value
I have a Dictionary<int, string[]>.
And I want to know, if with the functions of Enumerable/Collection it's possible to get in one line "approximatly", to regroup all string[] value in ...
0
votes
0
answers
45
views
Combining Elements of multiple arrays and applying a loop to search for the combined elements
Please forgive me as im not a coder by default i do this as a hobby by picking up small projects and trying to solve them as best i can.
I have a binary file that i convert to Hex with Bit Converter, ...
0
votes
0
answers
148
views
Receive UDP string
I'm trying to read data by UDP protocol when press a button, but I can only read the data once after pressing a button. I need to receive this
string of data continuously and insert a LF after CR to ...
0
votes
0
answers
987
views
Splitting a string into an array of strings in c#, without using split method?
Homework question here. Input has be a date, and must be formatted like this: day/month/year (e.g "22/03/2022). Have to come up with a way to split the initial string into an array of three ...
0
votes
0
answers
1k
views
Format json array in one line without tabs or line breaks for http post c#
I'm trying to convert a json array into an string without any tab neither spaces so i can use it on a http post request. The json is the following:
[
{
"subjects": [
...
0
votes
0
answers
39
views
asp.net c# - Check for certain string conditions
I'm trying to check for certain conditions in a string. For example these strings:
House of Love
Amy Grant House of Love [Remastered]
Amy Grant House of Love [Remastered](new)
Amy Grant - House of ...
0
votes
0
answers
54
views
How can I do pattern matching for the below text using c#?
String text = "time : 11/22/2019 10:22:22 AM Message: db connection failed. Catergory: debug Priority: 2 EventId: 5 process Id: 12 process name: exe.win32"
How can I do the pattern matching ...
0
votes
0
answers
116
views
Which is the proper way to convert a byte[] to a string in order to have the expected Rijndael format?
I have problem when I transform a byte[] to a string.
I have used these ways so far:
System.Text.Encoding.UTF8.GetString(byteArray);
System.Text.Encoding.UTF8.GetString(byteArray);
I use Rijndael in ...
0
votes
0
answers
479
views
How can I map array of strings in c# to object properties using automapper
public class DummyDto
{
public string Artx_text_value_1;
public string Artx_text_value_2;
}
I have such method which is mapping array od strings to properties to DummyDto.
public void ...
0
votes
0
answers
48
views
Problem with a transformation from a char array to a string in C#, if the array has two entries which are the same
First, excuse me for my poor english.
I'm fairly new to this website and to programming in general, but I've made some researchs to find a solution for this problem.
I'm making a little program which ...
0
votes
0
answers
167
views
c# How make a typeconverter for a basic type like byte[]
I have a lot of structures made in C++ COM server like
mystruct { char name1[16]; char name2[32]; }
When I send these structures to a C# COM client they become
mystruct { byte[] name1; byte[] ...
0
votes
0
answers
37
views
How to use Javascript Array String in c#?
I am getting one Javascript Array from HttpRequest as below :
"var time[0] = '2019-11-23 20:11:12'; var plate[0] = 'DK01A11511'; var path[0] = '/LPR/2019112404111200.jpg'; var region[0] = ''; var ...
0
votes
0
answers
96
views
Wrong char index in string
I'm making a sudoku solver, and I ran into some problems I cannot solve...
The idea was to make a string array which is the sudoku board. So I have two for loops which passes two numbers in a method, ...
0
votes
0
answers
226
views
C# remove accents (diacritics) from byte[] array containing UTF-8 text and compare
I am not able to figure out how to do a large UTF-8 encoded text file search.
My case is I have a massive UTF-8 encoded file that I need to analyse, which contains texts that also have accented ...