I have a text file that is generated daily and can contain several lines with 15 numbers drawn from 01 to 25 in each line, the text can have one line or several lines, it changes every day.
I need to compare with an array 'Result' and count how many numbers in each line are equal to the numbers...
If anyone can help me, I'm not able to convert the txt to include in the list
string thePath = @"C:\Spectrum.txt";
string seq = File.ReadAllText(thePath);
//read the numbers by line
string[] text = Regex.Split(seq, "\t");
List<(double mz, double intensity)> ions = new List<(double mz...
Need to calculate the number of ships. Ships are presented as a “battleship” game.“1” represents a ship, “0” represents water. C#
namespace Ships
{
class Program
{
static int[,] ships = new int[10, 10] {
{ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, },
{ 0, 1...
I am writing a program to input and output a simple array.
static void Main(string[] args)
{
int[] arr = new int[10];
Console.WriteLine("Enter nmber of elements");
int n = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the...
I am extremely new to coding and I am currently learning C# on my own. I have searched around but I cannot find what I am looking for. I may not be searching for the correct terms.
I am wondering how I could swap sections of 2 different 2d arrays, with each other, and form a new (child) 2d...
Since List<> is just a wrapper around an array why can't I supply the array through the constructor? It only allows a collection which is relatively expensive opposed to just handing it an array directly.
I am in a difficulty to convert a List that is class object which populated from database, so far so good to have that list of object but I need its string[,] (2D) array as converted to apply a method which helps to get an print output.
private void dateTimePicker1_ValueChanged(object sender...
Hello,
I'm working on fixture project and trying to assign teams with each other.I have 18 teams and half of this is playing at home and the other half is playing at away.I created 2 structs.First struct is named "Teams" and holds the infos about each team(it's code is at below)
public struct...
Im making a game and after the first run run when the user clicks new game I get index outside bounds of array.
This is the the new game button code
panel1.Controls.Clear();
int x = int.Parse(heightentered.Text);
int y =...
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.