c#

How to correctly output a collection of objects in a DataGrid? - WPF

There is a DataGrid with a single column: <DataGrid x:Name="dataGrid" AutoGenerateColumns="False" ... not output anything. As I need specify the data source for the DataGrid, so that it can output them in the described column?

UserControl with parameters in MVVM (C#, WPF)

Hello everyone. A question from a newbie. I plan that at some point in the application, some instance of the UserControl wil ... outside, how do you explain to them that this particular View instance is associated with this particular ViewModel instance?

windows sftp server

Tell me how to create an sftp server ? The task is to test a certain library in which the query query and other parameters (g ... Login, methods.ToArray()); using var client = new SftpClient(con); It turned out to connect... Now I would download the file

C# Sorting a single column (the first one) in a two-dimensional array (2 columns) with the elements in the second column rearranged according to the first column

The following array is specified: Int [,] sortNums = new int [3, 2]; / / for example There may be something like { 3, 0}, ... implementation: Arrays.Sort(sortNums, Comparator.comparing((int[] arr)-> arr [0])); But nothing similar was found for C#.

The difference between asp.net core and asp.net core mvc

I often find these two names on the Internet. Are these different technologies or just two names for the same framework? And if there is a difference, please explain it.

How do I assign the "Script" type to a variable and then select it? Unity C#

I have 2 scripts on the object: 1st "Enemy" and 2nd for example "Goblin", the Goblin class is inherited from Enemi and since ... lin" or "Soldier" script, which will call the same function, but different in terms of the content. How to do this correctly?

The architecture of the application(game) on Unity

I started developing games on Unity. When creating it, problems began to arise with the" purity "and" literacy " of the scrip ... n example of such a genre as an isometric shooter: character, zombies, houses, weapons and other charms. Thank you in advance

Stages of creating a computer game on Unity

I write a computer game, but I do not know what is missing, because I collect information in Youtube on courses that the auth ... se needs to be done?) Creating the main menu. We are putting together an ekzeshnik. Please add to my list or write your own.

How do I specifically make a game crash on Unity?

You need to make sure that when you enter the trigger, the game either crashes with an error, or there is a crash. Is it possible to do this somehow?

Spawn of an object in a random unity position

Game 2d. The idea is to write a script that will spawn objects on the axis in a random place on the X axis in the range that ... nt to make the blocks fall down and be a kind of Enemi for the player. I tried to write my own scripts, but they didn't work.

How to access an object via the Unity C# script

There is an object "objBall" - this is an asset, just a ready-made circle. And this object should appear randomly in differen ... he script can be attached to the main camera of the scene for convenience? Or do you need a new script for a separate object?

How to make control for a 2D character in Unity on PC, without double jumping and with the player turning in different directions

How to make control for a 2D character in Unity on PC, without double jumping and with the player turning in different directions

Pause in C#

Tell me, how can I pause the program for a while? System.Threading.Thread.Sleep(500); Hangs the entire program.

How do I change the Rotation of a child object relative to its parent?

Such a question. I have a parent object Sphere, and a child object is attached to it, the point of appearance of the projecti ... er to fix its position; it shoots it out instead of the projectile, thus not being able to launch projectiles. Where to dig?

How do I implement starting and stopping the timer every time a mouse event is activated?

I have a timer, as well as a button and a mouse event. For each tick event of the timer, two random integer values are genera ... Random rand = new Random(); randPosX = rand.Next(340); randPosY = rand.Next(340); }

Spawn of a class instance in unity

I have not been in programming for a long time, so the question is also not the most adequate. I want to create several NPCs ... ce; void Awake() { instance = this; } void Start() { Instantiate(Green, new Vector3(0,0,0), Quaternion.identity); } }

How can I animate an object in Unity when a button is clicked using C#?

Today I started to master the Animation component in Unity2D, I made an animation of the appearance of the start window, but ... "Welcome"); GetComponent<Animation>().Play("PointsPanel"); GetComponent<Animation>().Play("Close"); } }

How do I get the volume from the microphone in decibels in real time?

I would like to know if there is any library for python or c# that would allow streaming to measure the decibel level of inco ... d the microphone? For example: A person speaks into a microphone and I need to measure its volume in decibels through a code.

Rotating an object in Unity

You need to rotate the object in unity. In Inspector, you can see that it is rotated, but in the camera view, this is not not ... here k is a random number from 0 to 3 Then I tried through: obj.transform.Rotate(0, 90*k, 0); But the result is the same

(Unity) Correct implementation of the NavMeshAgent collision

There is a list of NavMeshAgents that go to a single point when clicked. The agent settings are standard. When they try to ge ... .x + Random.Range(-2, 2), targetPosition.y + Random.Range(-2, 2), targetPosition.z); agent.destination = MathPosition; }