All Questions
3,845
questions
2
votes
1
answer
52
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)
{
...
0
votes
1
answer
82
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 ...
1
vote
1
answer
67
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 ...
-1
votes
2
answers
78
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 ...
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&...
0
votes
2
answers
51
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 ...
1
vote
1
answer
64
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);//...
-1
votes
3
answers
83
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)
{
...
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.
...
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 ...
1
vote
2
answers
47
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 ...
1
vote
1
answer
354
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 ...
0
votes
0
answers
33
views
Why is list of structs not IEnumerable<object>? [duplicate]
Running the below program gives the following output:
Class is object.
Class list is IEnumerable<object>.
Struct is object.
Struct list is not IEnumerable<object>.
That implies that a ...
1
vote
2
answers
155
views
C# Add List class to new List class without looping
I have a list of users returned in a class
My Class: List
public class EmployeeList
{
public int Emp_No { get; set; }
public string Sys_Prefix { get; set; }
public short Company_No { get; ...
0
votes
0
answers
69
views
Unity setactive() not working because of object name
So I have a sort of item system in my game and it opens a savefile to see what items the player has at the time, when it loads it enables and disables objects based on the savefile information. Which ...