All Questions
402 questions
-2
votes
1
answer
83
views
modifying items in byte[] arrays using loops (C#)
I got a byte[] array from an input file (ASCII text file) and I'm trying to delete all bytes of a pre-set hex value, without converting the array to string and without using lists.
This is the code I ...
0
votes
4
answers
103
views
How to concat various chunks of string array based on a condition
Lets say i have a string array like this,
string[] array1 = {
"<p>here is a big sentence</p>",
"file1",
"file2",
"<p>this is a big ...
1
vote
5
answers
86
views
In C#, I'm trying to iterate strings in single loop, how?
I'm trying to achieve this output:
LOWEST LOW MEDIUM HIGH HIGHEST HIGHEST HIGH MEDIUM LOW LOWEST
I know there are many ways to do it, but I'm trying it in single loop, is it achievable?
My code is ...
-1
votes
1
answer
48
views
Does my loop do what I described or is it doing something else? [closed]
So I'm a newbie programmer in C# and in a school course we are suppose to compare two differnet arrays with each other. The instructions we were given were that each number in the first array would be ...
0
votes
1
answer
57
views
Filling and array from user input and assigning it
Still learning here.
My code runs correctly through he first part. However when it ask for the 'productName,productCatagory etc. It just keeps looping and doesn't hold the data and move onto the next ...
-1
votes
2
answers
127
views
How do I prevent the same number from being entered twice in my lottery program in C#?
I have an assignment due today and I am pretty much done. The assignment is to make a lottery with arrays which I have done, but the last step is to make it so that the user can't enter the same ...
-1
votes
2
answers
453
views
Inserting user input to an array in a loop and then printing it, C#
How do I send values from userinput to an array in a loop that will be saved in the array in memory and the how do I print all values in that array. (C#)
Console.WriteLine("Enter name of ...
0
votes
0
answers
45
views
Im trying to get the parallel arrays that I set up to properly compare with items in a text file
I pulled in some data from a text file and made them into 4 parallel arrays. One array for a currency code, a currency description, an exchange rate and then an array that holds all of them together. ...
2
votes
4
answers
174
views
How do I search a string of text for words that begin with specific letters and then print them?
I have a string of text and I need to check the string for words that begin with the letter A, then print said words to console.
So far, I have converted the string into its individual parts but am ...
0
votes
1
answer
39
views
Get the maximum Count of a range of values in an Array in C#
I have this array. If the minimum Value is defined as 22, I want the get the maximum number of integers that are next to each other that are higher than 22. For example, here 22 and 23 and higher or ...
0
votes
3
answers
261
views
C# how to count how many numbers in an array that are not within a specifc number
the input is like this
100 5
0 10
0 5
75 95
12 17
13 14
and the output is 65
so i want the program to count which numbers from 0-100 are not in the array.
this is how i started
static void Main(...
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
2
answers
40
views
Extracting mixed-order data of type xml that I get from API
I am getting data with the help of api for credit card information. The data I got is as follows.
<<?xml version="1.0" encoding="ISO-8859-9"?>
<CC5Response>
<...
0
votes
1
answer
37
views
Task of getting the third number of an array and doing math equations on the 2 numbers before the third in C#
I'm trying to do the task in the title but I run into issues in the loop of getting every third index from the array.
double[] N = new double[3];
int[] M = new int[9];
...
0
votes
2
answers
158
views
How to return the char, of a loops next position, in a char array?
I want to replace a string (that the user inputs) with the next character in the alphabet. I'm having trouble returning the next value from my loop.
Error message: Index was outside the bounds of the ...