10,267 questions with C#-related tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

How do I keep .NET 4.6.2 WinForm MenuStrip visible on top of application workspace when using Visual Studio 2019 form designer?

I have inherited some C# source code written in Visual Studio 2010 targeting the .NET 2.0 framework. It comprises a simple Windows Forms application with a single form as its user interface. The form contains a number of menu items, one of which…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,831 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-01T19:24:42.753+00:00
DB17 21 Reputation points
commented 2022-01-10T18:18:44.687+00:00
mohammad mehdi alipour 31 Reputation points
1 answer One of the answers was accepted by the question author.

Reduce Left Margin / MVC

Hi, How do I reduce the left margin or start after certain length from left?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,177 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-10T13:58:43.007+00:00
SSinhg 286 Reputation points
accepted 2022-01-10T17:29:27.663+00:00
SSinhg 286 Reputation points
5 answers

Properties and events as interfaces

I was working on wrapping the YouTube APIs. I need a way to copy the data between my fields and YouTube's. So, I went to create some standard methods I could call. Pass both sides and which direction to copy. But Google used properties in their…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,387 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-05T07:54:21.78+00:00
Will Pittenger 281 Reputation points
answered 2022-01-10T16:18:06.227+00:00
Bruce (SqlWork.com) 56,526 Reputation points
0 answers

SelectionRangeChanged and AxisViewChanged do not fire when ZoomReset is called.

(C#) I have a Chart that where the X & Y axis are zoomable. When I Zoom in using the mouse both SelectionRangeChanged and AxisViewChanged are called. However, when either Zoom(Int32, Int32), ZoomReset() or ZoomReset(Int32) are fired neither…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-10T00:35:06.753+00:00
Mark Nelson 1 Reputation point
commented 2022-01-10T16:03:49.313+00:00
Mark Nelson 1 Reputation point
0 answers

Error in Office 365 (Web) when using System.Diagnostics.Process.Start(@'c:\document.xls') by C#

Good evening! I'm a self-employed C# desktop developer (Visual Studio 2008 Pro and Dot.Net 3.5). I've always used the System.Diagnostics.Process.Start(@'c:\document.xls') resource; to open any application by passing a file that is either on the user's…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-07T13:48:05.64+00:00
Luis Herrera 1 Reputation point
commented 2022-01-10T11:56:24.797+00:00
Luis Herrera 1 Reputation point
3 answers

How can we fetch the data in the table according to the table name entered in the textbox? (in C# or asp.net)

How can we fetch the data in the table according to the table name entered in the textbox? (in C# or asp.net) E.g: (select * from users) I want to use - textbox.text instead of "users". Like (select * from textbox.text). Thank you in…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-10T08:14:00.857+00:00
Gökhan C 1 Reputation point
answered 2022-01-10T09:14:04.213+00:00
Gökhan C 1 Reputation point
1 answer

Error after upgrading from ASP MVC 5.0 to 5.2.7

Hello, I just recently upgraded MVC to 5.2.7. I installed MVC using Nuget. Upon running my project, I receive the following error: Method not found: 'System.Web.Routing.RouteValueDictionary…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,263 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-07T20:25:33.12+00:00
Eli Hellmer 1 Reputation point
answered 2022-01-10T03:08:51.993+00:00
Lan Huang-MSFT 25,556 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

What is more expensive, storing multiple strings, or one large concatanated string?

Hello. Say I have a class, that stores information on a file. You have the path, the name of the file, and the extension. Would it be better to store a string for each of those, like this: public class File { public string path; public string…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-09T12:37:23.393+00:00
M0ment 41 Reputation points
answered 2022-01-09T16:59:39.967+00:00
Bruce (SqlWork.com) 56,526 Reputation points
2 answers One of the answers was accepted by the question author.

How to move a WPF application when DragMove() is not working?

I have a WPF application where I can not move my application according to my mouse movement sometimes it's freeze or shut down. I use fluid layout that means I use Grid.row definition to distribute my Grid space. <Grid.RowDefinitions> …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,674 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-04T20:02:15.327+00:00
MERUN KUMAR MAITY 511 Reputation points
accepted 2022-01-09T14:19:49.36+00:00
MERUN KUMAR MAITY 511 Reputation points
1 answer One of the answers was accepted by the question author.

Unable to run PrintTicket example in .NET 6 console app

I am trying to run the example shown in the Microsoft Windows Desktop 6 System.Printing documentation (URL: https://learn.microsoft.com/en-us/dotnet/api/system.printing.printticket?view=windowsdesktop-6.0) in a .NET 6 console application in Visual Studio…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-08T19:38:46.073+00:00
Nicholas Piazza 531 Reputation points
commented 2022-01-08T22:04:55.17+00:00
Nicholas Piazza 531 Reputation points
1 answer

Compiler error "consume excess memory due to the indexing expression"

Hi, I am trying to construct a Bayesian network that contains 8 parents(which are iKorean, iOthrserv, iMay, dYrsserv, iSept80, iVietnam and iFeb55) pointing to 1 child(which is iRvetserv), and while compiling, I got the error like this: " [1] This…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
.NET Machine learning
.NET Machine learning
.NET: Microsoft Technologies based on the .NET software framework.Machine learning: A type of artificial intelligence focused on enabling computers to use observed data to evolve new behaviors that have not been explicitly programmed.
150 questions
asked 2022-01-04T04:24:48.78+00:00
Jingwen Pan 1 Reputation point
answered 2022-01-08T06:25:57.483+00:00
Jingwen Pan 1 Reputation point
1 answer

ClickOnce Update Location as Github

Hi, so I created a simple app versioned 1.0.0.0 and published it to a local path via clickonce and set the update location to a github repository. Now I've made changes to the app and it is now versioned 1.0.0.1. So should I upload the published files of…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-07T14:31:40.627+00:00
Hemanth B 886 Reputation points
commented 2022-01-08T04:00:31.447+00:00
Karen Payne MVP 35,036 Reputation points
5 answers

Converting VBA to VS 2019 Winform C#; however, the Designer's ToolBox does not list InkPicture

I am in the process of converting a VBA app to Visual Studio WinForm C#; however, the ToolBox InkPicture Control is not listed in the Toolbox. The MS web-site for Tablet PCs lists the steps to add the InkPicture control…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-06T14:53:43.893+00:00
Giacomo Raucci 321 Reputation points
answered 2022-01-07T20:49:48.827+00:00
Giacomo Raucci 321 Reputation points
1 answer One of the answers was accepted by the question author.

How to avoid to give direct credential in .NET source code

I am developing .NET Application. I have cloud SAP application which contains documents. Using Cloud SAP, i am fetching the data as an xml and storing the data in to MySQL database. for this, i am developing one page code. The question is, i…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-04T09:13:07.123+00:00
Gani_tpt 1,546 Reputation points
accepted 2022-01-07T16:11:03.117+00:00
Gani_tpt 1,546 Reputation points
1 answer

OAuth Authentication with TLS 1.2 in WPF Window Application dotnet framework 4.0

WPF Window Application dotnet framework 4.0 used OAuth authentication. used Microsoft.Identity.Client Library to implement OAuth Authentication. When we see logs on azure monitor all users sign in with Legacy TLS(TLS 1.0,1.1,3 DES). We want…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,674 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
765 questions
asked 2022-01-07T08:09:24.49+00:00
Parmar, Hariom 1 Reputation point
answered 2022-01-07T10:10:12.657+00:00
Ken Tucker 5,846 Reputation points
0 answers

connect python with hololens2 (Unity)

Hi, What is the best way to share data and connect python to unity in realtime mode for hololens2? Is it server and client? Or "Python for unity"? Or any other ideas?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
381 questions
asked 2022-01-07T00:12:42.727+00:00
Mahya Mir 21 Reputation points
commented 2022-01-07T09:28:36.837+00:00
Hernando Ren 2,166 Reputation points
1 answer One of the answers was accepted by the question author.

Getting error in implementing form resize in a winform app using krypton toolkit..

I have created a windows form application using Krypton toolkit Krypton which has its controls like combo box, datagridview, buttons etc. I basically want the controls to resize accordingly when the main form is resized so that no control gets hidden or…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,831 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-06T09:09:42.547+00:00
don bradman 621 Reputation points
accepted 2022-01-07T07:32:26.027+00:00
don bradman 621 Reputation points
2 answers One of the answers was accepted by the question author.

Xamarin-Plugins/SimpleAudioPlayer - Error in Code

Hi I want to use a mediaplayer in my Xamarin/C# to mainly play Audio files (mp3/wav). I have installed Xamarin-Plugins/SimpleAudioPlayer into my first Android project. The following is the code for playing an audio file: ISimpleAudioPlayer…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-05T16:54:10.357+00:00
Riffy 276 Reputation points
commented 2022-01-07T01:15:41.187+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,656 Reputation points Microsoft Vendor
5 answers One of the answers was accepted by the question author.

Why isn't the GenerateKey method available for my ECDiffieHellmanCng object?

Documentation for the ECDiffieHellmanCng class shows a GenerateKey() method, but this method is not found/recognized in my project (Visual Studio 2019). Any thoughts on how I can get to this method? Russ

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-06T18:07:37.623+00:00
Russ Beech 41 Reputation points
accepted 2022-01-06T20:43:53.58+00:00
Russ Beech 41 Reputation points
1 answer

ECDH public key size

I have an ECDiffieHellmanCng(256) object. I expect the public key to be 512 bits - 256 bits for the X value and 256 bits for the Y value - or 64 bytes. When I put the public key into a byte array I end up with 72 bytes. I need to send a 32-byte X…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,267 questions
asked 2022-01-06T16:15:28.3+00:00
Russ Beech 41 Reputation points
answered 2022-01-06T17:21:01.09+00:00
Russ Beech 41 Reputation points