how to use ServiceBase in .net core 3.1?
can not use ServiceBase in .netcore 3.1 right? I want to create windows services in .net core 3.1 how to do it?
Incorrect Console display, although the code is good
Hello, my first question here, but got a really strange error. Asked my teacher but he was surprised too, and could not repeat this. So I have a code with no errors, works fine on other computers, but mine almost always us with an incorrect…
Unable to compile .net 6.0 projects in VS 2022
I am unable to compile .net 6.0 projects in VS 2022 (version 17.4.3). I see error message that - MSB3971 The reference assemblies for ".NETFramework,Version=v6.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or…
Adding distinct value to each CSV file given my code
Hello. I have the following code which seperates my Records.CSV files to two different CSV files based on COMPID (-> a key given in a dictionary I created): (the first 3 files): records -> sepereated into two above : anyways, I…
How can we be sure that the number of iterations of commands in "Parallel.ForEach" matches the number of iterations that were set for it?
Hi guys, In my article, I want to compare the speed of sequential processing to parallel processing in various conditions, so in one example, I want to convert the following sequential command to parallel, but after converting it to parallel, it…
How can we be sure that the number of iterations of commands in "Parallel.For" matches the number of iterations that were set for it?
Hi guys, In my article, I want to compare the speed of sequential processing to parallel processing in various conditions, so in one example, I want to convert the following sequential command to parallel, but after converting it to parallel, it seems…
How to create async thread?
public async Task Update() { //code. } how to run it in thread? I can not use like this: var thread =new Thread(Update); it must be void.
Modifying a key to a dictionary and writing it back to file
I have a text file that's read into a dictionary using a .net 6.0 console app. What's the best solution for modifying one or more of the keys, write the dictionary back to the original file. Example: Current Text read into a dictionary …
how to get the assembly code of the code?
I want to get the assembly code of the code how to do it using .net? If I have one code: int i = 10; how to get its assembly code mov eax 10; ret;
creating csv based on certain key of db table
hello, I have the following code: which will generate the following table : into a csv file: I want to split that csv into different CSVs using COMPANY_ID column as identifier. for example, first file will be named…
System.NullReferenceException: 'Object reference not set to an instance of an object.'
In my windows application while trying to sync my app with live server I am getting this error can anyone suggest me how to solve this problem . Thanks in advance using c#
How to handle mutiple calls at OnReceive method in Actor class in AKKA.NET using c#
Hi, I have an C#.net core 3.1 console application. I have developed Actor model in my application using Akka.Net How to handle multiple calls at OnReceive method (below example: Method_A() invoked multiple times simultaneously, this will making…
Net Framework missing or blocked
In an efforts to enable an MVC IIS site to come up, someone suggested uninstall and reinstall of Net Framework. The removal of NET Framework causes Server Manager to disappear and control panel or "Turn Features On and Off" search in the…
Unit testing C++ CLR
What is the best approach to write Unit Tests for C++/CLR? We have a solution that includes C++ native, C++/CLR and C#.Net code. When I try to add a C++/CLR reference to a C#.net Unit Test project, it compiles, but when I run the tests it says…
How to execute task in certern time every day?
I want run a function at certern time everyday . the programe is loop and will check every 1 minutes. I will read record in database and get one time such as "08:00" for another is "09:00" and I want to run function…
How to create pub-sub model in C#?
Hi, I have an C#.net core 3.1 console application. I need to develop pub-sub model in my application. How to create pub-sub model in C#? Can you share me some sample code for pub-sub model in C-Sharp code? Regards, Prabs
C++/CLI project with C++20 Standard
Hello, I got this compilation warning from a CLI project with C++20 standard setting: 1>c1xx : warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17 Will there be a support for C++20 and…
Scheduled task executes but not calling console exe
I have created an console application on my personal windows 10 laptop (having admin rights) using .Net Framework 4.5.2 which performs conversion of .csv/.xls/.xlsx file to .pdf. Application contains configurable paths in config file and also a class…
Create and run a new cloud function when a VM is not connected to any network
I have a question regarding func command. I am doing a test to see if we can create and run a new cloud function when a VM is not connected to any network. (the Azure Core Tools is already installed) After disconnecting the VM from network, when I…
Localization or globalization of the windows application
I am working on a windows application which need to localized to spanish language . Once localization is done while testing the tool screen reader the contents are available in spanish visually but when we chewck them with screen reader thne contents are…