.net

The class field has the same return type as the class itself

Let's say the Person class is created, which has some fields. And one of the fields has a class type, which it is included in. How to use this field. What values can it take and in general in what cases is this implementation needed?

How SqlBulkCopy works in.NET "behind the scenes"?

For the sake of interest, I looked at the sources to understand how the representation of data in memory is sent to the serve ... re sending - regardless of what is fed to the input, they are copied to the array, but I did not find the most interesting...

openFileDialog, saveFileDialog

If it is not difficult then you can explain step by step how to work with both objects? Or a good link.

How to calculate CRC16 Modbus RTU C#

Faced with a problem, took an example for calculating CRC16 Modbus in C# from here I compiled the code and created a unit te ... ing, but the results still do not converge. Who to trust? I will be glad for explanations and help, I am grateful in advance!

Circular singly linked list C#

It was necessary to implement a ring list. Made through extension methods. But there is one caveat. How to implement the retu ... sOrLast<T>(this LinkedListNode<T> current) { return current.Previous ?? current.List.Last; } }

How to draw a star in a circle c#

How to draw a star in a circle in c# using picturebox? private void OnPaint() { int n = 5; // ... ; } private void button1_Click(object sender, EventArgs e) { OnPaint(); } } } I only got this:

How do I remove accents in a string?

I have a string áéíóú Which I want to convert to aeiou How do I remove accents? I need to save in the database as a URL.

Adjust form layout according to monitor resolution

I made a form in fullscreen, where the monitor I use is 23" inches. But where the functionality will be deployed, they use 1 ... Is there any way to make it responsive according to the monitor or will I have to edit the size of the components? 23" 19"

How can I replace a part of a string with itself plus the character "~"?

How can I replace a part of a string with itself plus the character "~"? I'm doing as follows: only when the string has ... match.Value + "~"); match = match.NextMatch(); } System.Console.Write(lista); } }

Start Windows Forms program in the background

I developed a monitoring application using Windows Forms, but it does not need to have anything visual at the moment, so I wo ... ons are,etc.). I don't have much experience with Desktop applications and I can't find a way to do this, could anyone help?

How to install a Windows Service without Setup?

I have a Windows service project in Visual Studio in C#, however, I need to install this project from lines of Code, without using the Installutil of the console and neither the setup of Visual Studio. Do you have any way to do this?

Inserting numeric data into the database

I'm having trouble inserting into the database the field is formatted as DECIMAL(10,2)), when I try to insert the direct mone ... nco de dados :" + ex); } } Anyone have any idea how I do to insert the value into the bank correctly?

How to select more than one txt file with C#

I am writing an application in C # that needs to receive more than 1 text file and display the Filename of them in an individ ... fDialog.ShowDialog() == DialogResult.OK) { MessageBox.Show(fDialog.FileName.ToString()); } }

What is the purpose of TransactionScope blocks?

I have a code with multiple blocks TransactionScope and I didn't really understand its purpose. ModeloColDataContext dm = Da ... { // .... } } } Then the questions: What is it for? and when should we use?

How and when to use Finally after a Try?

First I would like to know why to use finally What are your advantages? Does it really only serve when an output occurs within the scope of a block try-catch, like when some return or goto occurs inside?

How to make a Split for when there is a letter in the string?

I would like to make a string be split with the .Split() every time there was a letter. Example: To string: 97A96D112A109 ... 115 114 122 118 128 } How can I do this? Code I have (to use as a base): string[] az = txt.Split(/*Parametros aqui*/);

What are Parallel loops.For and Parallel.ForEach?

Vi or use of Parallel.For e Parallel.ForEach in some places I know they are loops , but I have not understood how and when I ... e my doubts. What are loops Parallel.For and Parallel.ForEach? When should we use them? Have any differences between them?

What is the difference between using single quotes and double quotes in C#?

In PHP, when we use single quotes or double quotes, both forms have as functionality the declaration of a string. There is on ... er difference to double quotes? Why did the error described above occur when I tried to use the 'ProductSupplier' statement?

What is the difference in using the Equals method for the = = operator?

What is the difference in using the Equals method for the == operator in situations of comparing (1) Value Types and (2) reference types?

Memory allocation in C# - Value Types and reference types

In C# there is a difference between how memory is allocated by the CLR for reference types (classes) and value types (structu ... does this distinction exist? After all, classes and structures, despite having differences, are quite similar to each other.