c#

Pool in unity, what is it?

Please explain what pool is in unity and preferably advise a resource for studying them.

RSA encryption

If I have, for example, prime factors: p (1119182087) q (1861375333), their product (m) 2083217929877259971 and e (5), how can I encrypt a message with a public key using this data? Who can give you a sample code?

Russian characters in ASP.Net Core

"Server" code: using System.Net.Http.Headers; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using M ... }); } } } But the "server" has returned not what I need: How to force it ASP.Net Why send Russian characters?

string with double quotes in multiple lines?

Visual Studio 2019 There is data { "product": "oil", "price": 544.13 } string json = "{\"product\": \"oil\", \n \"pric ... Need: string json1 = @"{"product": "oil", "price": 544.13, "volume":11 }"; \" - не помогает

Formatting text in Html. ActionLink

I have this menu: <ul class="menu"> <li><a href="/"><span class="activ">пункт1</span> ... aw and new HtmlString, but the type doesn't fit Type conversion from " System.Web.IHtmlString "to" string " is not possible

C# WPF MVVM ViewModel - Model and ViewModel - ViewModel relationship

I have something like this Window View It consists of 3 regions: File Manager, Workspace, and Menu. I need to make adding ... del notify when the View Model changes? About Prism, EventAggregator I know, I'm interested in a solution without framework

Model for ActionResult is Null

I write tests for controllers on NUnit. The platform .NetFramework 4.7.2. There is a problem that ActionResult does not retur ... by archived return PartialView(model); } Error screen Line 62 - this: Assert.IsInstanceOf>(result.ViewData.Model);

Simple/Primitive / Built-in Types in C#

Hello everyone Please define the following concepts: Simple types (simple types); Primitive types (primitive types); Built-i ... Or is there something I don't understand? I searched in other sources: there simple/primitive / built-in types are synonyms.

BinaryReader () How to determine the end of a file

Gentlemen, please tell me how to determine that the file (stream) ended when reading from the file? I use BinaryReader (). He ... inaryReader(fs); string s = ""; while (br.PeekChar() != -1) { s = br.ReadString(); bw.Write(s); } }

CallBack call

How do I make a callback call in C#?

Problem event name: CLR20r3

I try to open my program on the server 2008. the error Имя события проблемы: CLR20r3 Сигнатура проблемы 01: opcchecke ... 53a78882e789 I put a framework on the server 4. The program is also under the 4 framework. it runs on my 7, as well as on xp

How do I programmatically click a button?

How do I programmatically click a button?

How can I use the mvvm c# wpf pattern to process an event?

I am trying to implement the application according to all the rules of mvvm, and I ran into an event handling problem. For ex ... s a text field that the TextChanged event is bound to, but according to the rules, the method is processed in the viewmodel.

Can ModelView have a reference to the View in the MVVM pattern implementation?

I write a program in WPF, using the MVVM pattern. I need to change from ModelView a certain property of the button described ... o this? Would this be a good solution? If not, how to implement it correctly (how to work with window controls in ModelView)?

Reassigning side mouse buttons(conflict with stock actions)

I want to write a program like logitech options (reassigning keys) the main feature, which will be gestures and the ability t ... I only found how to disable the mouse and keyboard completely, which does not suit me, tk I use gestures! I'm at a dead end(

Alternately pull SIN(X) from the expression SIN (SIN(20 + 20)) + COS (20)

The problem is that the regular must pull out the first match with a paired number of parentheses. That is, according to the ... (SIN(30) - SIN(40)) Must pull: 0:SIN(20) 1:20 And from SIN(20 - SIN(40)) Must pull: 0:SIN(40) 1:40 C#, .NET language 4.0!

How to read a binary file correctly

I have a Book collection that contains a list of books. I create a binary file and write this data to it. There are no proble ... } } // Читаем файл using (BinaryReader reader = new BinaryReader(File.Open(_path + "\\Books.bin", FileMode.Open))) { }

Wpf c# Animation

There is a XAML animation for a custom textbox: <EventTrigger RoutedEvent="MouseDown"> <EventTri ... тут анимация </DataTrigger> </EventTrigger> </Border.Triggers>` But he swears

Discord How to get a username with a Discord ID

I have a lot of Discord IDs. I would like to get from ID -> user#1234. In the official API, I found https://discord.com/de ... here are shared servers/friends with this id I would like to implement it either with#, or by request. Thank you in advance.

How do I pass a negative value parameter to Unity C#in GameObject.SetActive(bool)?

In the scene, I have GameObject Cube, and there is also a code where the cube "turns off" when you press the D key. That's ab ... pressing D, SetActive takes the parameter of the current opposite sign value, but how to write this parameter I have no idea