Questions tagged [c#]
C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.
429,256
questions with no upvoted or accepted answers
99
votes
1
answer
6k
views
Marching Cubes - generating holes in mesh
I'm working on a Marching Cubes implementation in Unity. My code is based on Paul Bourke's code with a lot of modifications. I'm checking if a block at a position is null, and if it is, a debug ...
38
votes
1
answer
1k
views
Let image ManipulationMode capture pointer
In my app, a user can select an Image and drag it onto a Grid, to play with it. I do this by handling the PointerEntered event of the Grid. Here I detect if the user had an image selected and if the ...
31
votes
1
answer
4k
views
ASP.Net Core 1 Logging Error - The description for Event ID xxxx from source Application cannot be found
I would like to write to the Windows Event Log from an ASP.Net Core application's Controller method.
The issue I have is that, where I expect log information to be written I keep getting the error/...
28
votes
2
answers
1k
views
Streaming with go-between in Windows 8
I want to stream data from a server into a MediaElement in my Windows 8 Store (formerly Metro) app. However, I need to "record" the stream while it is streaming, so it can be served from cache if re-...
27
votes
1
answer
1k
views
Activating Focus Assist Windows 10 Setting Programmatically C#
I'm building a C# WPF application and want the ability to programmatically enable and disable the Windows System Feature Focus Assist.
I've tried researching how to control this feature ...
25
votes
0
answers
908
views
SAP Sybase SQL Anywhere NullReference Exception when openening and closing many connections in a service
Currently I've the problem that SAP Sybase SQL Anywhere randomly throws NullReferenceExceptions in a service which executes a lot of sql queries. The connections are always created in a using block ...
25
votes
3
answers
3k
views
ScrollIntoView and ListView with virtualization
I have ListView (virtualization is on by default), which ItemsSource is bound to ObservableCollection<Item> property.
When data are populated (property is set and notification is rised) I see 2 ...
23
votes
1
answer
2k
views
Load and save layout of anchorables - Binding of Visibility
I am facing the problem that I cannot open an anchorable of type X after I have loaded my old layout. This happens only when I have closed the anchorable of type X before saving the layout.
Does ...
23
votes
0
answers
3k
views
(WindowsPrincipal vs GenericPrincipal vs ClaimsPrincipal)'s Identity property
TL;DR. I'm writing this up to potentially help someone else's googling in the future as I found no documentation on this particular behaviour, and partly on the hope that someone could confirm (or ...
21
votes
1
answer
780
views
Process.WaitForExit hangs even without using RedirectStandardError/RedirectStandardOutput
We have a service which starts a process and waits for process to exit when service is stopped/ user of service calls stop (to stop/kill process started by service).
Sporadically, process.waitForExit(...
19
votes
0
answers
952
views
Create Custom ActiveX Controls for SAP B1
I am trying to create custom control for SAP b1 using ActiveX.
I created Windows Forms Control Library
Made Project Assembly Info COM-Visible (Project properties => Application => Assembly ...
18
votes
0
answers
1k
views
ReSharper custom pattern ambiguous with multiple member definitions
I am attempting to transform eager class instantiation to lazy instantiation.
I've followed the eager pattern throughout the codebase, but now want to change it to the lazy alternative (and remove the ...
17
votes
1
answer
5k
views
@attribute [AllowAnonymous] in Blazor server-side component has no effect
I have created a fresh Blazor server-side project with .NET Core 3.0 and have closed down the application for non-authenticated users.
I am now trying to allow anonymous access to Index.razor ...
17
votes
3
answers
3k
views
Azure SQL stored procedure ridiculously slow called from C#
Summary:
We have two identical databases, one on a local server, one on Azure.
We have a C# system that accesses these databases, calling stored procedures.
The stored procedures are running very, ...
16
votes
1
answer
5k
views
Unity3D: How to show only the intersection/cross-section between two meshes at runtime?
The Problem
Hi, I'm basically trying to do the same thing as described here:
Unity Intersections Mask
With the caveat that the plane isn't exactly a plane but a (very large relative to the arbitrary ...