Category "c++sharp"

VSTO with Windows Form and Worker Threads

I have an Office addin (Outlook if it makes a difference) created with VSTO. The addin creates a Windows Form at startup. My Form creates several threads. I'

Evaluate Conditional Expression

I have a scenario in which I am saving my "if" conditions in database as a string. For example: String condition = "(([age] >= 28) && ([nationality]

How to detect other outlook events such as "Forward as attachment", "Reply with Meeting"

Out of the box outlook provides the following: ((Outlook.ItemEvents_10_Event)this._mailItem).Reply += new Outlook.ItemEvents_10_ReplyEventHandler(MailItem_Repl

Using Layers and Bitmask with Raycast in Unity

Unity's Raycast functions has a parameter you could use to raycast to a particular GameObject. You can also use that parameter to ignore particular GameObject.

How to set connection time out when establishing context - PrincipalContext

using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain, Domain, UserName, Password)) { UserPrincipal U = new UserPrin

Collection of AddressEntry object from Global Address List MSDN

Using below code snippet i can get single addressEntry object that is 1st matched. How to get the collection of matching addressEntries objects under global add

How to use c# tuple value types in a switch statement

I'm using the new tuple value types in .net 4.7. In this example I am trying to make a switch statement for one or more cases of a tuple: using System; namespa

How can I link Image Source = "?" with Value from DataTable (path image) in WPF?

I am looking to change the value Source = "img / Best / 1.png" for the DataGrid cell that I clicked on, with a click, a button, any option. How can I bind the v

How to create a .RC file to include version information & icons?

Im a bit new to this stuff. I Want to generate a .rc file that would include Version Information & Also contain Icons in it.. Version Information: VS_VERS

Use Serilog with Microsoft.Extensions.Logging.ILogger

I've created a .NET Core 3.1 project using a Host, the IoC container with IServiceCollection and implemented logging allover the place using the ILogger<T>

How do I get client IP address in ASP.NET Core?

Can you please let me know how to get client IP address in ASP.NET when using MVC 6. Request.ServerVariables["REMOTE_ADDR"] does not work.

Save rich text boxes as pdf files and send an email with attachments

I want to save rich text boxes as pdf files. Each time I save a file Adobe Reader can't open it. private void button3_Click(object sender, EventArgs e) { Sa

How to Make a Custom Extension for Reactive Extensions

It is not hard to find an example of how to make a custom LINQ extension method. But I can't find an example of how to make a custom Rx extension method. Can

C# event debounce

I'm listening to a hardware event message, but I need to debounce it to avoid too many queries. This is an hardware event that sends the machine status and I h

Fix string encoding issues

Does anyone know of a .Net library (NuGet package preferrably) that I can use to fix strings that are 'messed up' because of encoding issues? I have Excel* fil

How to find dynamically created XAML component by Name in C#?

How to find dynamically created XAML component by Name in C#? I created next button and put it into the Stack Panel. var nextButton = new Button(); nextButton

WebException how to get whole response with a body?

In WebException I cannot see body of GetResponse. This is my code in C#: try { return GetResponse(url + "." + ext.ToString(), method, headers

How to override other windows application's elements? [closed]

Can you please point me into the right direction? I want to edit other application textbox or click, programmatically. For example, in a web

get message id of sent item from exchange in cache mode in outlook

I am getting message id (using propertyaccessor) in outlook for microsoft exchange emails for sent items if not using cached mode. But, in cached mode, it is e

Process.Start and Process.StartInfo not passing arguments properly

The short story is I'm writing a front-end for the emulator MAME as a study in WPF and C#. The GUI is set, it's reading cfg's properly, everything is fine ex