Category "c++sharp"

Using pscp in C# for file transfer between Windows and Linux through a post request

I have been trying to transfer files through a C# code, but it doesn't seem to work. Although the following line in command prompt works fine. "C:\Program Files

Alternative for c# .Last

Currently I am using .Last to find the last number in a database and then assign the incoming information a number that is plus one higher the last number. var

WPF bind list box Selected item into textbox

I'm trying to put any selected item's name in my list box in the textbox next to it. But I've got trouble doing so. Here's a little bit of my code: <Doc

Getting timeout error - increase the send timeout value on binding

WCF service returns timeout error as below. The request channel timed out while waiting for a reply after XX:XX: XX increases the send timeout value on binding.

error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.3\Microsoft\Portable\v5.0\Microsoft.Portable.CSharp.targets" was not found

I have .net core test project. When I build it in visual studio or use the TestManager it build without a problem. But when I execute the following command on t

Why is my .Net app only using single NUMA node?

I have a server with 2 NUMA node with 16 CPUs each. I can see all the 32 CPUs in task manager, first 16 (NUMA node 1) in the first 2 rows and the next 16 (NUMA

Check if todays date exists in a table with Entity Framework

I have a database table with columns of type dateTime. Now I need to see if there already is a row with today's date, but I don't know how to compare the column

.net core, testing service application. After leaving worker loop, program not stopping until console window closed. Is this normal behaviour?

I'm testing a .net core 6 multi-threaded service worker app that processes batches of data rows and tables on sql server. I use serilog to log to file only. Whe

How to Open Outlook file attachment directly not saving it? ( with C# VSTO)

I need to open mail file attachment directly from mail. Let say I have .txt file. I have already attached it to my mail. But now I need to open it, change some

How do you copy RTF attachments into a new mailitem?

I am working with C# Outlook Object Model (with a little bit of C++ extended MAPI for decoding TNEF for RTF mails) and am trying to find a way to get the attach

How to implement a client_credentials grant type in an angular http request?

I've created an OAUTH2 authorization server which uses client credentials for authentication and is responsible for the issuing of JWT tokens. When I place my

ServiceFilter and TypeFilter - what is the difference in injection those filters?

ServiceFilter we must register in Startup.cs. TypeFilter is injected by Microsoft.Extensions.DependencyInjection.ObjectFactory, we don't need to register that f

Adding launch conditions to Microsoft Visual Studio Installer Projects (check app is running)

I'm using Microsoft Visual Studio Installer Projects for my Hybrid Widndows Forms/WPF project. I need to make sure the user has closed the Application (an older

MessagePack subtype serialization

Serialization/deserialization turns a collection of a base type with child-type items in it into a collection with base type items only. Is there a way to set u

EF LINQ query with Expression: method name expected - How can I pass an Expression into function to be used in EF query?

I have a function that's supposed to return different info from an EF LINQ query based on an Expression and/or lambda that's passed to it. Here's my code: pub

Running .dtsx file via command line programmatically from a winform c#

I am new to programming. I was hoping for some help to correct the below code. I have a WinForms application using an Azure SQL database. overall I am trying to

Tabular Editor: How to use advanced scritpting to create multiple measures based on one value and one category column

I am trying to create multiple measures in Power BI through advanced scripting in Tabular editor that would replicate a Calculate(Sum(ColA),Keepfilters(ColB=i))

How to generate class with file-scoped namespace syntax (C# 10) in vs code?

I would like to generate a new C# Class or C# Interface in Microsoft Visual Studio Code following the newest C#10 file-scoped namespace syntax. https://docs.mic

Why app returns only one supported culture?

I try create language switch on my site. I've add cultures in Startup: IList<CultureInfo> supportedCultures = new List<CultureInfo> { new Cultur

How to receive attachments from users

How do I receive an attachment from a user? I've tried iterating through the Attachment object to extract the content of attachments, but it's always null: fore