c#

Delegate as a parameter

Good evening, dear experts! I have this question: I need a method of something like this: public void MyMethod(Func del) { ... you need to write your own method for each Func? And what about passing parameters for these delegates? Thank you in advance

Creating a graphic editor on WPF

Is it possible, using WPF technology, to create a full-fledged graphic editor in C# with saving images and animations? In what format can I save the animation?

Using gif animation in WPF

Tell me, how can I implement the display of gif animation in wfp?

How do I draw an ellipse based on the coordinates on the Image?

There is a class that allows you to draw an ellipse at the x, y coordinates on the canvas. How can I draw the same ellipse on ... ftProperty, (double)x); circle.SetValue(Canvas.TopProperty, (double)y); } } draw.circle(x, y, 10, 10, cavRoot);

Draw a line on the image and move it

I want to draw a line or group of lines programmatically on an image and then manipulate them (move, resize, rotate). The lin ... d then the image is saved with the positions of these lines. Are there any enterprise / open source software APIs for this?

How to delete a row from a DataGrid and delete it from a SQL database

At the expense of questions similar to StackOverflow. They are indeed similar, but there is no exact answer to the question, ... 40"/> </Grid> How do I implement deletion when clicking on the "Delete" button using the SelectionChanged event

Inline keyboard Markup C# problem with creating buttons in the telegram bot

There is such a code for creating buttons var keyboard = new Telegram.Bot.Types.ReplyMarkups.InlineKeyboardMarkup(new Telegr ... }); The error is this: 'InlineKeyboardButton' does not contain a constructor that accepts arguments 2.

Unit Tests for the Calculator

Good afternoon on another question helped, with the solution of the calculator to all thanks for the help shas I have such a ... double a, double exp) { double act = Koren(a); Assert.AreEqual(exp, act); } } }

Transferring information between forms

The task is as follows. It is necessary that the Form2 form has access to the data created in the stroka class from the Form1 ... it myself, but I came across a similar code in the network, then I did it on the fly, and still it turns out to be an error.

How do I get ALL the data about a video file? (bitrate, format, codecs, etc .)

Is it possible to implement this ? What is necessary for this and by what means to implement it?

WPF Textblock in 2 layers

I put one Textblock on top of the other to create the animation I needed, but I noticed that the edges of the lower one are j ... </BeginStoryboard> </EventTrigger> </TextBlock.Triggers> </TextBlock>

How do I unpack a 7-zip archive?

How do I unpack a 7-zip archive to the specified folder with file replacement, preferably without resorting to third-party programs (using libraries)?

C#, The Windows service cannot start

I wrote a Windows service in C#. At startup, an error is returned: The TFFU service could not be started on the Local compute ... led = true; } private void OnElapsedTime(object source, ElapsedEventArgs e) { //Тут должна быть программа }

Windows Service Application C#

Hello, dear programmers! I ran into the following problem: I'm new to C#, just learning. Creating a Service application. The ... Windows Service Administrative tool or NET START command. Although the service is running. Tell me, what am I doing wrong?

InstallUtil.exe Installing and running the Windows Service with the parameters

There Is A Service: C:\MyService.exe I am installing the service: > InstallUtil.exe C:\MyService.exe But the problem is t ... viceStartMode.Manual; this.Installers.Add(processInstaller); this.Installers.Add(serviceInstaller); } }

c# try catch Nested

How does the processing of the finally block occur if the construction try { try { } catch {} finally {} } catch {} finally {} Will the same block work or not?

How to unpack 7z?

It took my own hands to make an installer-unpacker of the archive. It doesn't matter why with your own hands. But I've never ... that unpacks archives before. I read about 7z.dll (or 7-zip.dll?). In general, I did not understand which one to use and how.

Code First migration conflict

Tell me what the problem may be, an error occurs when migrating to add a relationship between tables Конфликт инструкции ALT ... out what the reason is, I understand he doesn't like the Id field, but I did the same with other tables, everything was ok.

Modifying the Dictionary collection [C#]

Hello everyone. When trying to modify the values of the Dictionary collection in a loop: // абстрактный пример foreach (KeyVa ... e items in the collection? If not, is it possible to modify it in a normal way? the sequence in the loop-enumerator ? Thanks!

Entity Framework update only one entity (table)

I have a certain model from the Entity Framework. You need to somehow update only 1 entity (that is, fill 1 table with data f ... creating all the content: _dataContext = new MyMagnEntities(); Because I haven't found another way yet. How to do it right?