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

All Questions

Tagged with
0 votes
1 answer
47 views

Parse a text file into instances of an object

I'm currently working on a university assignment, and I have a problem with parsing text files into instances of an object. A simple explanation of the program I'm working on is a takeaway shop loader....
Legois's user avatar
  • 1
-3 votes
0 answers
42 views

How could I filter out a text file to add instances of an object? [closed]

I'm currently doing an assignment where I create a takeaway shop. People can load their own text files that has menus for different takeaway shops, for example one text file has the menu for one ...
Legois's user avatar
  • 1
-1 votes
1 answer
60 views

Adding simple logic in C# objects that are meant for one-time use [duplicate]

This is not a "how-to" question, but rather a "share your thoughts" question for senor C# developers. I'm a junior C# developer who has worked in C# for about a year (and in other ...
ogrim's user avatar
  • 1
2 votes
1 answer
53 views

Why is object array null later in the script even after confirming its not null after initialization

The title. there are no mentions of the spriterenderers or array anywhere else in the program SpriteRenderer[,] Renderer = new SpriteRenderer[8,8]; void Awake() { if (D) { ...
Tyler Levy's user avatar
0 votes
1 answer
118 views

Refit - FromForm / Multipart method not working with request object

I have a .NET 8 web API controller with the following endpoint method in it : [HttpPost()] [Route("someRoute")] [ProducesResponseType(typeof(SomeResponse), StatusCodes.Status200OK)] public ...
Martin's user avatar
  • 2,127
1 vote
1 answer
70 views

Access nested objects in C#

I am trying to access specific properties from my object via Google Books API. The content is deserialized into two POCOs to access the nested object. I am stuck on is accessing the properties of ...
Juan21Guns's user avatar
-1 votes
2 answers
79 views

Is there a way to make a class with no limit on the number of Generic Type Parameters in c#? [duplicate]

I am working on a project in which I need to define any number of possible parameters when creating an object. public class base { //Variable Declarations here... public base(){ //Handle ...
Zacc's user avatar
  • 23
0 votes
0 answers
19 views

Model Creation for Dynamic property in C# [duplicate]

Existing data: existing = { "MediaLRN" :'2', "Media":'a.2', "CultureDetails":{ "24 Hrs": [ { "Organism": "15&...
Kathiravan S's user avatar
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
1 vote
1 answer
67 views

== and Equals for Tuple<object>

i have a question why it works like this var a = new Tuple<object, object, object>(1, 1, 1); var b = new Tuple<object, object, object>(1, 1, 1); Console.WriteLine(a.Item1==b.Item1);//...
Кирилл Гелашвили's user avatar
-1 votes
3 answers
85 views

Reading object value from other class in C#

I always have coded in C++ but I am learning C# now. I got a trouble with accessing the object value. Here is what I tried. class Program { static void Main(string[] args) { ...
Euijin Jung's user avatar
1 vote
3 answers
122 views

Using the object value in the class in C# [closed]

I always have coded in C++, but now trying to learn C#. I was trying to create multiple objects and use data of them in C#. However, it does not work in the way I desire. Here is the code I tried. ...
Euijin Jung's user avatar
0 votes
0 answers
46 views

Is there a way to return data from a database call as an general object rather than a specified type, without creating a new class

I have a function that is trying to return a list of all transactions from the database. To do this it needs to retrieve all the data from TransactionItems, and then join that to the data retrieved ...
Luke 135's user avatar
1 vote
2 answers
49 views

Why is null Unity Object equal to null in specialized class but not equal to null in generic class?

Attach TestMono to an empty GameObject, leave the serialized field uov empty and play. The result is not what I expected. using System; using UnityEngine; using Object = UnityEngine.Object; namespace ...
Hailin Li's user avatar
1 vote
1 answer
383 views

C# "Smart Reference"/"Handles" allowing for an object to be "destroyed" immediately

I am working on a small scale game engine and have reached a point where I would like to destroy a Game Object (destroy meaning all references to an object become null). This is important because even ...
Wolf's user avatar
  • 87

15 30 50 per page
1
2 3 4 5
257