9 questions from the last 1 days
0
votes
0
answers
58
views
Why does this C# code take 6 seconds instead of 5?
I implemented this simple loop in C# which runs a 100 times, and in each iteration waits for 50ms.
using System.Diagnostics;
var sw = Stopwatch.StartNew();
for (int i = 0; i < 100; i++)
{
...
0
votes
1
answer
33
views
Json Serialization - Work around for ExpandableObjectConverter [duplicate]
I'm writing code for .NET 8.
Given this class Sample:
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
[DataContract]
public class Sample
{
[DataMember]
public int SampleId {...
Advice
0
votes
4
replies
40
views
Does the finally block run when returning inside try, and what happens if finally also returns?
I have a question about how try/finally behaves when using return statements in C#.
Consider the following methods:
public int Test()
{
return 12;
}
public int Test2()
{
try
{
...
0
votes
0
answers
30
views
PCM audio data strange values in NAudio
I want to make an application that reads out the db values from a microphone. For that I use NAudio to "record" a WaveIn stream, convert the Data to samples, get the max of each buffer, ...
-1
votes
0
answers
55
views
cant send an array of js via formdata to controller(my viewmodel wont bind to it) [closed]
this is my productupdate page .whenn the user clicks on the update button the details preload here via viewmodel sent by action.
the user can see its previously uploaded pictures and since i cant ...
0
votes
0
answers
17
views
Godot Mono with Facepunches Steamworks implementation throws shared object file error
I am using Godot Mono 4.5.1 stable, and am trying to get Facepunch.Steamworks working. I specifically run into this error:
E 0:00:02:363 Steamworks.SteamAPIInitResult
...
/usr/lib/dotnet/shared/...
1
vote
1
answer
60
views
Why is my WPF DataGrid RowDetail ignoring SelectedItem but accepts ItemsSource?
I am using a WPF DataGrid with MVVM approach. The ItemsSource of the DataGrid is bound to an ObservableCollection of something which has an Id and an ObservableCollection of strings.
I want the Id to ...
1
vote
1
answer
87
views
Prevent Visual Studio from autocorrecting (in this case quotes don't overwrite)
If I select something and then type quotes, it doesn't replace as expected, it just puts quotes around the selected text.
select
type one quote (")
instead of the expected
or
How do I ...
0
votes
0
answers
56
views
RabbitMQ .Net unsupported external secret error [closed]
hi everyone first of all i did what i all know but it doesnt work
services:
hotelreservationapi-presentation:
image: hotelreservationapi-presentation:latest
build:
context: ./...