I have an array something like this: int[,] multiDimensionalArray2 = { { 1, 2 }, { 4, 5 } }; if I want to retrieve 1 and 2 and feed them into this: int a; i
So i upgraded to VS 2022. and anytime i add a semicolon. the whole code block gets backtabbed. does anyone know how to turn this off? getting tired of hitting c
I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls.
I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls.
I have a WPF application that uses the built-in Settings functionality. When I release a new version of the application, I increase the assembly version and exe
Xunit has a nice feature: you can create one test with a Theory attribute and put data in InlineData attributes, and xUnit will generate many tests, and test th
I can find email attachment from a MailMessage by ContenId like the following code : System.Net.Mail.MailMessage objNewMail = null; System.Net.Mail.Attachment
I'm developing an Outlook 2010 custom plugin in C#. This is my first time using C# (I'm a java guy normally). There is a named (custom) MAPI property on a mess
How can I access the Windows Sensor API from C#? Everything I can find is either for C++ or referencing outdated libraries. I tried using the Windows API Code P
currently I have a timer that has DontDestroyOnLoad function in order for it to cycle through scenes that needed a timer, my question is how can I destroy my ti
I am making a game using Visual Studio 2022 and C# and I was wondering if it was possible to trigger some code when you hot reload your app (whilst it's running
I wanna send data from client to server. There are two queues. in client side and in server side. I want to my client to be connected to the server and send all
In my app I have generic repository connected to controller through UnitOfWork. I want to unit test my app. To make this I need to mock db connection. Can you t
I am trying to define this simple mapping in my profile CreateMap<CompanyClient, MyDto>() .ForMember( dto => dto.PaymentTerms, opt => opt.M
Per MSDN: A static constructor does not take access modifiers or have parameters. A static constructor is called automatically to initialize the class before t
The reason for interfaces truly eludes me. From what I understand, it is kind of a work around for the non-existent multi-inheritance which doesn't exist in C#
How can I get all filenames of a directory (and its subdirectorys) without the full path? Directory.GetFiles(...) returns always the full path!
Currently this is what it looks like: I'd like to change that blue color, but I don't know what property to change. I've tried changing what I think is t
I have a UserControl which includes Datagrid. Inside Datagrid I've set EditingElementStyle with Textboxes that have ContextMenu for Copy/Paste commands. I need
When I am opening a Visual Studio project with VB.NET then the Form view designer is automatically opened, but when I open a new project