c#

How do lambda functions work?

I'm trying to understand how lambda functions work and I saw on metanite how it does the following: delegate Operation (int ... thod is written directly? Please tell me how you can find similar constructions or something else to understand how it works

Screenshot of the entire screen

How to make a screenshot of the entire screen and write it all to a .png or file .jpg? Actually, I will perform the recording ... g the Print Screen button immediately disappears. And so that the screen appears in pictureBox1. Thank you all for your help.

Unpacking and running the exe from the program resources

Hello. I have already built a program in c# (my own), and I would like this program to be extracted somewhere, for example, in Temp, then run from the program, and after the program works with this file, it deletes it from Temp.

Unable to find the compiler executable csc.exe

Visual Studio 2019 development environment, C# language, .NET Framework v4. 7. 2. I am trying to compile a simple code that s ... Console.WriteLine("ERROR {0}", err.ErrorText); } Console.ReadKey(); } } }

The index was outside the bounds of the array

I'm sitting, so I'm doing kursach, and here "The index was outside the boundaries of the array". Here's a piece of code, wher ... M / 0 / 05.06.2014/05.06.2014/3 Petrov A. A/ Cupcakes/ 20000/ 04.04.1960/ 05.06.2014/ Idle/ M / 0 / 05.06.2014/05.06.2014/3

What you need for запуска.net core 3 WPF applications?

Do I need to have the .net framework installed on the user's computer or .net core to run such an application?

How do I convert a.png image to sprite(2D and UI) programmatically?

How to programmatically convert an image to sprite programmatically? I get a list of images like this: public void GetFileSe ... ror); } } } } } How do I now automatically convert images to sprite(2D and UI)?

Import Svg files to List via Unity code

Svg files(Textured Sprite) are not imported via the code: Resources.Load<Sprite>("camping"); The sprites are located ... is code also does not work: pics.AddRange(Resources.FindObjectsOfTypeAll<Sprite>()); I ask for your help, gentlemen.

How do I stop the loop? C#

There is a button that starts the action when pressed, and stops it when pressed again private void Button_Click(object send ... hod is executed, but in the SomeWork() _stopWork method everything is exactly equal to false. Why is that? How do I fix this?

Changing the image when the button is clicked. There are many buttons

Please tell me how you can implement a large number of buttons with the same two changing images so that you do not write a p ... nd. After all, it will be inconvenient to write 100 properties, 100 commands, and 100 bindings in the markup for 100 buttons.

C# YouTube Downloader

I write a video downloader from YouTube on lib VideoLibrary. The interface has a progress bar and two buttons + another input ... yte[] bytesvideo = video.GetBytes(); File.WriteAllBytes(result + video.FullName, bytesvideo); } } }

MSMQ: Maximum message size

When using MSMQ, I can't transmit a message larger than 4 mb (restriction). How do I get around this restriction ?

In unity, when using SetParent (), an object changes its shape to its parent

void Update() { if (Input.GetMouseButtonDown(1)) { Vector3 point = new Vector3(camera.pixelWi ... nother object, but it disappears (we assume that it changes shape to the parent, since the parent object is an empty object).

How do I make a timer with a cycle of 30 seconds?

Hello everyone. How do I make a timer with a cycle of 30 seconds, that is, a timer that will turn on again when 0 seconds are ... timerText.text = Mathf.Round(timeStart).ToString(); } } I will gladly accept criticism and take into account mistakes:)

How to execute a cmd command via C#?

I have a button that, when clicked, should format the disk selected by the user in the list. You can implement this via the cmd format command, but how do I execute it? Also, taking into account the fact that the disk name can change.

How do I apply a texture to a Terrain object in Unity?

On the procedurally generated surface, you need to apply a texture, first - at least one. However, in the Unity lessons, they ... ) Although I kind of explicitly added a renderer. Please tell me where the error is, and whether I'm doing it right at all?

How to change the seconds in the countdown timer

There is a class taken hence: using System; public class CountDownTimer : IDisposable { public Action TimeChanged; ... er = new CountDownTimer();//создаем инстанс timer.SetTime(1,0); Does not replace with the right one, always starts with 12.

How to separate tachi and swipes

Friends, how can you divide the tachi and swipe? The idea is that when you touch, you have to jump, and when you swipe, move ... rb.AddForce(targetPosition * jumpHeight * Time.deltaTime, ForceMode.Impulse); Debug.Log(isGrounded); }

Code First approach, how to build a table correctly

I use the Code First approach, I want to make a simple model of an online store. I want to use the Product, Client, Order ent ... cts { get; set; } public DbSet<Client> clients { get; set; } public DbSet<Order> orders { get; set; } }

how to teleport an object

I want to make clouds in the main menu of the game that are like floating over the ocean. and I don't know how to loop their ... public float speed = 2; void FixedUpdate() { transform.Translate(direction.normalized * speed); } }