windows 2016 steps into future for half hour at 23:00 CET and then returns to normal
I have asp.net core 3.1 program with a very basic async socket receiver and a blazor webassembly frontend. Every half an hour a machine sends a report (+/- 1000 bytes) to it, which is then stored to sqlserver and to a file on disk. Al thru the day this…
How to get info from xaml file in C#
Hello. In my C# program I want to know how to read this file: <!-- Info.xaml --> <Credentials Username="UsernameHere" Password="PasswordHere"/> and get the Username's value and put it in a string, how can I do this?
Use Microsoft CNG library to load key from KSP and use it to initiate two-way-ssl mutual authentication
I have to connect to a backend service that is secured using two way ssl. The certificate I use for this handshake resides in an HSM. I've installed the HSM providers KSP software. I'm using Microsoft's CNG library to lookup certificate generated in…
Xamarin.Forms: UWP UI Binding errors that aren't real errors?
In my Xamarin.Forms app every ListView in UWP is rather slow in creating the cells, or entries, or rows, or whatever they're called. On Android and iOS the ListView scrolls as fast as you can make it go, but on UWP after a short fast scroll the list…
Can we use script-src 'self' 'unsafe-inline' in the content security policy of the .net application?
In our asp.net SharePoint application, we have used script-src 'self' 'unsafe-inline' in the content security policy as sharepoint is generating some inline javascript code dynamically at runtime. But CSP validator showed red flag for using…
How do we find very first closest value from the list of values linq C#
I have the list of values. like below. I am struggling to get very first closest values from the list. How do we get this...? For example, i have the list below. list<double> data1 = {1000, 2000, 3000, 4000, 100, 350, 600, 800, 200, 300, 400,…
c# remote development from windows visual studio like c++ linux console?
Is there a way in existing VS2019 to have a dotnet c# project be compiled and debugged on a linux host from a project template in Windows like the template for " c++ linux console"? Project on windows, sources and build copied to linux…
Under what circumstances will Utf8JsonReader.HasValueSequence be true?
I have begun working with raw value spans and sequences inside my JSON converters. I noticed that Utf8JsonReader provides a property to check to see whether the value is a sequence: HasValueSequence. When will this be set to true? I noticed that…
Console Aplication (C#) - Memory Leak
I have a program "Console Aplication" install in Windows that execute every time. Initial consume 32 MB, but grow infinitely. My program execute connection with DB oracle through provider "Oracle.ManagedDataAccess". To Diagnostics…
What are the recommended practices for cross-platform library development with C# 9?
What features of C# 9 could be safely used: in Xamarin (Android/iOS), in "the legacy" .NET Framework (4.8+), in "the obsoleted" .NET Standard 2.0/2.1? Unfortunately, .NET 5 is not "the only one united…
How do find min value based on parameter from excel range column by column using C#
I have below data in my excel table. i am passing parameter value "9050". Here the value should search from column by column of every cell values. for example, Input value "9050", it will come near by column of…
How to prevent ComImport interface function reordering?
Hi! I have strange problem while writing c# ComImport interface. Same name functions are reordered!? Example.... In C++ IDCompositionVisual function order is: STDMETHOD(SetOffsetX)(THIS_ float offsetX ) PURE STDMETHOD(SetOffsetX)(THIS_ In…
C# Coding Confusion01 - Derived Classes run aborting on previously working code
I’m following two MS tutorials ([https://video2.skills-academy.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/object-oriented-programming1]()) which use bank accounts to introduce Classes and Derived Classes. The first of the two tutorials created a single…
C# beginner: program flow not understood
I’m just starting to follow a tutorial at https://csharp.net-tutorials.com/ I’m trying to understand why the processing flow doesn’t “drop through”. In the first code set it stops after the main block despite no errors being identified by VS. The second…
Check only one line of the string
Hi, is it possible to check if only one line of the stringbuilder matches to another string? //Server Token Datei lesen string server_token_string; using (StreamReader sr = new StreamReader(@$"{localappdata}\Liquid…
C:\Documents and Settings' is denied
Hello. I used the code below. If i it run "C:\Documents and Settings' is denied" appears. How can I skip denied folders? Thank You. string rootDirectory = System.IO.DriveInfo.GetDrives()[0].RootDirectory.FullName; string[] files =…
LinQ, GroupBy, C#, sub list, check state - improvement of the query
Hello, The below code works very well. The question is, can I solve this in one query? If so, how would I implement it? I want to know if a position has a bad status. If so, the product is bad. Return value is bool. Thanks for tips in advance! var…
Why Am I Getting Error Using TransactionScope?
Hi, Everybody! I am having trouble with TransactionScope. I want my web method to be transactional. If any exception occurs, I want all database changes rolled back. Otherwise, commit. Please see error message below. System.ApplicationException:…
Datepicker accessibility Issues.
Hi I have added a datepicker in Windows Forms Application. I need system to read out the date that is selected Or Focused when Screen Reader or Narrator is turned ON. Example: When The start date is Highlighted then it should…
How to fin Class/Entity References and Line Number
Hi folks, I hope you are doing well. I want to write a program in C# that extract the class/entity references and with there line numbers where it is used in solution. I do research from internet I have found some references() but it can't me help.…