All Questions
17,680
questions
-3
votes
1
answer
78
views
Create a recursion function to respond with a different object [closed]
I'm a receiving the following data from a HTTP request to get all menus available:
[
{
"ID": "2",
"Name": "Home",
"ParentID": "1&...
-1
votes
1
answer
43
views
is this scriptable object script for unity correct?
using TMPro;
public class InstanziaOggetti : MonoBehaviour
{
public ObjectScriptable[] ObjectX;//name of the scriptableObject
public TMP_Text text;//3d text that will be instantiated above the ...
0
votes
3
answers
68
views
Search for a pattern in a string array
Let's assume I have the following array:
string[] arr = ["Off", "Off", "Off", "Duty", "Off", "Off", "Duty", "Duty", &...
-1
votes
2
answers
59
views
What is this type? And how can I return it from a function? [closed]
[FieldOffset(24)]
public fixed Int32 myArray[4];
As far as I understand it should be an int array. But I'm not sure. I stumbled over this while looking over a code base which is not mine. It seems ...
0
votes
1
answer
36
views
Send data to all sockets at exact time [closed]
Say we have array or list of sockets named (A,B,C) and we want to send data to all of them at the same exact time due to that the application is really time critical, then is there a away to send to ...
-1
votes
2
answers
37
views
Convert this to an array to output specific positions in the array
I'm looking for converting this list to an array so I can output specific strings from there. How could I do this? Here is the code:
public override void Select()
{
StringBuilder sb = new ...
2
votes
1
answer
45
views
Detect array type in source generator
I'm writing a source generator that processes my model classes and adds some custom serialisation code for them. The model classes can have all sorts of property types. I'm currently interested in the ...
0
votes
1
answer
34
views
Have my array be split and added on to the new array, instead of completely restarting it each loop
I have a problem with my array. Each loop, the array gets cleared and new values gets added onto it. How could I make it so as the array gets filtered, it gets added to a new array to fill it up with ...
1
vote
5
answers
79
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 ...
2
votes
1
answer
61
views
C# generic method detect if T is array and then index into the array
I'm trying to write a Dbg debug function that will print out some debug info about the given parameter and then return it. I would like arrays to be printed as the list of elements, and scalars to ...
1
vote
1
answer
79
views
C# inserting a value at the end of the array befroe sending it through the serial port
I have a problem and need your help please. I have an array and a textbox, the user will enter a decimal value of maximum 32 bits in the textbox. This value needs to be added at the end of the array ...
0
votes
1
answer
42
views
c# HttpWebRequest response string array object parsing error
I want to parse http request response into myDATA class. But gives me error
My codes under below. Im using also NEWtonsoft.Json
public class myDATA
{
[JsonProperty("data1")]
...
0
votes
0
answers
59
views
Why ToJson saves only {}? [duplicate]
Before this, I saved only one instance of the class in Json, and everything worked. Now when I try to save the whole array, nothing works for me. Please don't advise me to switch to some Newtonsoft. ...
0
votes
1
answer
39
views
Rotate - Getting the outer circle of a square array
I'd like to get the outer of a square array.
for example:the input is:
3
4 3 1
6 5 2
9 7 3
the output is
1 2 3
3 5 7
4 6 9
The original data was rotated 90 degrees to the right/clockwise.(the first ...
1
vote
1
answer
89
views
Find errors: Array - wrong output
I'm writing string[] to show multiple rows in the output. A stupid question, why the output is not 5 x 5?(I used i and j both from 0-4, then the ouput should be an array 5 x 5), can anyone help?
<...