Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
2 answers
52 views

How to check that there are no duplicates in an array? [duplicate]

I'm writing an application in C# that prompts the user for data for objects of an Automobile class. One of the properties of the class for which the program prompts the user for data is ID number. If ...
Johan Cloete's user avatar
0 votes
1 answer
54 views

A property in Child Object in Parent Object-A is changed when a new property in Child Object in Parent Object-B is added

Consider this object { "ClassId": 101, "Sections": [ { "SectionId": 201, "Subjects": [ { ...
Code Toddler's user avatar
0 votes
1 answer
34 views

Creating a 2-D array of integer triplets in C#

I am trying to create a 2-D array of integer triplets R, G and B using the following code: BitmapColours [,] PrevImage = new BitmapColours [1, 1]; public class BitmapColours { public ...
Jay Li's user avatar
  • 31
-1 votes
2 answers
63 views

Is it possible to add an extra element to an object[] array if it has already been instantiated?

Assume the following code as an example: static void Main(string[] args) { Object objects = new Object(); objects.object1 = new ObjectList[4]; } public class Object ...
Aleksandar's user avatar
-2 votes
3 answers
74 views

Problem sorting objects based on value of its properties

I'm sitting here with a school project I can't seem to figure out; I am to create a console application that let's the user enter a number of salesmen for a hypothetical company. The information about ...
pinkRobot435's user avatar
0 votes
0 answers
35 views

Cannot validate properly the username and password using Array.Find()

I'm trying to make a username and login system to validate if the username and password passed by an user by input matches the username and password in an array of objects. I did using Array.Find() ...
Pedro L's user avatar
-1 votes
2 answers
86 views

How to insert each object from the array of objects into the corresponding object in c#?

This thing is easy, so please give me a reference if there is one or answer. I have a array of different non-repeatable objects, e.g object[] data { Cat, Dog, Bird }; So I need to insert each object ...
Marija Magdalena Bašić's user avatar
-1 votes
3 answers
160 views

How to create an object dynamically from a string array?

I have a String array in C# like below: String[] myArray = {"1","Jack","18","2","John","22","3","Mark","29"} ...
Jesus Hamdi's user avatar
-1 votes
2 answers
557 views

how get item from list which is in Array of Object in c#

This is my code, I can`t get elements from the list which is situated Object array. How I can get "info" from data? Object[] data = { new List<string>() {"name", "name2&...
crux.'s user avatar
  • 3
0 votes
2 answers
75 views

Array of objects [duplicate]

Border[] _headerBorder = new Border[] { new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new Border{}, new ...
Alfred E. Neumann's user avatar
0 votes
1 answer
124 views

How to Display a Jagged Array? - C#

I am trying to get a jagged array that will solve the sums of the elements from dailyTemperature and that will successfully display them in the Main () under the Weather class. This is what I have so ...
ronalddonaldronald's user avatar
1 vote
2 answers
40 views

C#: Is there a way to return a side by side array with commas after what you input on a list on the console window from top to bottom?

I am new to C#. This is my code. When I run this code, I input the car name, mileage, year, make, model, color, and bodytype to a list that looks like this Name of Car: Car 1 Enter Mileage: 4000 (my ...
Hector Mellen's user avatar
0 votes
2 answers
85 views

Json with data inconsistency

I got this strange API response from one external service: {emplooye: "Michael",age:"25",attachments:[{idAttachment: "23",attachmentPath:"C://Users/1"},{...
Matheus E's user avatar
0 votes
2 answers
83 views

Can you change the default value for a user created class c#

I'm making a game and the background is made of Tile objects. The Tile parent is abstract but I have Tile arrays to hold the children. When I make a Tile array I want it to assume that any unspecified ...
EtherealChilly's user avatar
0 votes
1 answer
129 views

How to remove an element from an array and resize the array

I want to remove a specific object from an array, put it in a smaller array without getting out of range. This is what I've tried but it won't work. Skateboard[] newSkateboard = new Skateboard[...
fdignard's user avatar

15 30 50 per page
1
2 3 4 5
25