Content
what is the difference between constructor and properties
i mean in case we should declare a field as private is it better to declare a public property or using constructor? why? and if NO what is the usage of property? thank you very much :)


Parameter is not valid error keeps randomly coming up every so many hours
Hello, I keep getting an error in my weather application and I don't really know what is causing it. It happens every so many hours and randomly occurs. My program is designed to run 24/7 without any user intervention. When I go to close my application…


why invoking a multi-targeting library doesn`t work as expected?
I`m currently learning how to create multi-targeting library with dotnet. I created a multi-targeting library in .net6 and .net 7. However, when I calling the method in this library, the output doesn`t work as my expectation. excution command: in…


How to program the OnBackButtonPressed Xamarin
Hello I implented the the Mediapicker in my xamarin page, but if I am in the menu for "Picking up Photo" I try to click on Back Button to turn back to the previous Mainpage but it doesnt work because the BackButton is not defined. Please…


Xamarin.Form make OutBound Call with SpeakerPhoneOn
It use to be that AudioManager allowed to turn SpeakerPhone On and Off during InBound and OutBound Call. I have posted several question for Android 10-13 with Xamarin each of which have fallen on deaf ears. WHY? Could it'd be that Google has sabotage the…


Unable to bind the selected image file in Blazor file upload
"This question is updated with minimal sample as my old question doesnt give more info" I am learning blazor and c# fundas with a simple app.This app will allow you tobrowse all kind of files including images.As all kind files we can browse, i…


Using transparent PNG for game development?
I'm thinking of developing a game using transparent PNGs but I have a couple issues: I can only get things to animate while they are moving. The images cut into each other leaving empty spots.


Xamarin iOS - development app is deployed on IPhone, but I cannot start it
I have an app in Xamarin that I want to test on a physical IPhone (normally I test it on Android). I'm connected to a Mac, the development certificate is working and everything is deployed to the point that the app is actually installed on the IPhone…


How would I assign the members of one instance of a class to another instance of the same class in VB.NET?
How would I assign the members of one instance of a class to another instance of the same class in VB.NET? Both EETSettings and EETLightColors are istances of the same class in a VB.NET Windows Forms (.NET Framework) Application. EETSettings = New…


How to save login state when close browser?
when signed HttpContext.SignInAsync(claimsPrinciple); when I close the browser the cookie is not valid and I need login again. builder.Services.AddAuthentication("Cookie").AddCookie("Cookie", options => { options.Cookie.Name =…
Parallax Background in web page - Setting div element background to transparent does not work for me
I don't know if I'm having a senior moment or not... I'm trynig to implement a parallax scrolling type of display in a web page. I have sourced the sample code from W3 Schools and adapted it, by adjusting margins basically (Please see -…


How to implement custom elements in blazor 7 (Practical guide) ?
Hi everyone As you know, one of the new features of blazor 7 is custom elements. But there is not enough references & guides which demonstrate how to implement this. for example, I want to create custom element in my blazor server app, then consume…


Max size of System.IO.MemoryStream
Im trying to fetch a .bak file of 3GB size and upload to my blob storage using the SSH.NET package. I get an System.IO.IOException: stream was too long error! I cant find the max size of handeled streams for the System.IO.MemoryStream anywhere. Do…


Unable to add Token Providers when using multiple Identity Types
My application has two separate identity types. I created two types, as opposed to simply using roles, because the information I have to save about the types are pretty drastically different, and they use two separate applications that act on the same…
4.6.1 migrating to .Net Core 7 – How do I resolve error MC1000- cannot find type System.Management.Instrumentation.InstrumentedAttribute in Assembly ..path \.nuget\packages\system.management\7.0.0\lib\net6.0\SystemManagement.dll – Microsoft.WinFx.Targets
I am migrating a .netFramework 4.6.1 application to core. I have been able to get rid of all of the build errors except this one: Error MC1000 Unknown build error, 'Could not find type 'System.Management.Instrumentation.InstrumentedAttribute' in…


Aes.Create() crashing on Windows Server 2022
Has anyone encounter problems with Aes.Create() throwing an exception "Exception has been thrown by the target of an invocation". I just migrated to a new server with Windows Server 2022 on it and all of a sudden I am getting this error…
X509Certificate Client Authentication
Hello guys, I have the following code that was working perfectly fine for 3 years already. ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 …


[MacOS] Console Application - Issue recognizing the file Path
Dear community, I have this issue: I deployed a console application (C# - Visual Studio - Unix Executable File). As you will see in the following screenshots, the issue is that running by double-click or using the full path doesn't allow the Terminal to…


Edmx codegenerator for legacy project
I have been assigned a task required to use VS 2012 edmx generator. Therefore, I have to get a license for VS 2012 although we bought and use VS 2022. I am looking for a way that I do not have to install VS 2012. But the code won’t generate like VS…


The current .NET security policy prohibits C:\Users\...\File.xlsx from loading custom macros.
I am working on a project in Visual Studio Community 2022. The project is an Excel VSTO Workbook using Visual Basic (Target framework is .NET Framework 4.8). Up until yesterday everything was working fine, I could run and debug my project whenever I…

