11,748 questions with Developer technologies | C# tags

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

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,…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-27T04:34:11.17+00:00
BeUnique 2,332 Reputation points
commented 2020-11-30T07:51:16.757+00:00
BeUnique 2,332 Reputation points
1 answer

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…

Developer technologies | Visual Studio | Debugging
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-26T19:39:57.99+00:00
mwx 41 Reputation points
answered 2020-11-30T06:36:02.89+00:00
Tianyu Sun-MSFT 34,791 Reputation points Microsoft External Staff
0 answers

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…

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-27T22:27:08.71+00:00
TheBuzzSaw 1 Reputation point
commented 2020-11-30T02:03:37.127+00:00
TheBuzzSaw 1 Reputation point
1 answer

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…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-28T21:15:25.867+00:00
RAFAEL CAÇUCI 1 Reputation point
answered 2020-11-30T01:34:56.32+00:00
cheong00 3,486 Reputation points Volunteer Moderator
1 answer

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…

Developer technologies | .NET | Other
Developer technologies | .NET | Other
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
4,154 questions
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-26T14:30:42.217+00:00
TN 1 Reputation point
answered 2020-11-29T12:59:16.737+00:00
Karen Payne MVP 35,596 Reputation points Volunteer Moderator
1 answer One of the answers was accepted by the question author.

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…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-27T16:47:05.543+00:00
BeUnique 2,332 Reputation points
accepted 2020-11-28T14:25:37.777+00:00
BeUnique 2,332 Reputation points
1 answer One of the answers was accepted by the question author.

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…

Developer technologies | Windows Presentation Foundation
Developer technologies | .NET | .NET Runtime
Developer technologies | .NET | .NET Runtime
.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
1,307 questions
Developer technologies | .NET | .NET CLI
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-27T10:15:43.607+00:00
vb 286 Reputation points
commented 2020-11-28T13:25:33.913+00:00
vb 286 Reputation points
4 answers One of the answers was accepted by the question author.

C# Coding Confusion01 - Derived Classes run aborting on previously working code

I’m following two MS tutorials ([https://learn.microsoft.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…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-25T16:05:25.453+00:00
Art Hansen 601 Reputation points
answered 2020-11-28T06:58:52.727+00:00
Art Hansen 601 Reputation points
5 answers One of the answers was accepted by the question author.

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…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-22T09:01:15.743+00:00
Art Hansen 601 Reputation points
commented 2020-11-28T05:49:23.53+00:00
Bonnie DeWitt 811 Reputation points
1 answer One of the answers was accepted by the question author.

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…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-24T10:11:00.19+00:00
RobinJ 276 Reputation points
accepted 2020-11-26T19:41:25.707+00:00
RobinJ 276 Reputation points
2 answers One of the answers was accepted by the question author.

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 =…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-25T18:07:44.527+00:00
Blader 156 Reputation points
answered 2020-11-26T16:06:05.133+00:00
Blader 156 Reputation points
1 answer One of the answers was accepted by the question author.

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…

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-26T08:25:37.973+00:00
Markus Freitag 3,791 Reputation points
accepted 2020-11-26T15:29:05.59+00:00
Markus Freitag 3,791 Reputation points
2 answers

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:…

Developer technologies | .NET | Other
Developer technologies | .NET | Other
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
4,154 questions
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-21T04:37:00.397+00:00
Julio Bello 221 Reputation points
answered 2020-11-26T13:13:29.98+00:00
Nuno Pereira 1 Reputation point
2 answers

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…

Developer technologies | Windows Forms
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-26T06:16:22.21+00:00
Anonymous
answered 2020-11-26T10:53:59.95+00:00
Anonymous
3 answers

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.…

Developer technologies | .NET | .NET Runtime
Developer technologies | .NET | .NET Runtime
.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
1,307 questions
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-26T05:53:05.417+00:00
Saifullah 1 Reputation point
commented 2020-11-26T10:40:35.217+00:00
Saifullah 1 Reputation point
1 answer One of the answers was accepted by the question author.

How to create a single diminsional array starting from index 1 instead of zero

I am trying to create an single diminsion array that starts from 1 and ends at 7. I tried this: Int32[] lowerBounds = {1}; Int32[] lengths = {7}; Int32[] Julia = (Int32[]) Array.CreateInstance(typeof(Int32), lengths,…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-25T15:59:59.053+00:00
Emmad Kareem 81 Reputation points
commented 2020-11-26T07:18:10.21+00:00
Emmad Kareem 81 Reputation points
1 answer One of the answers was accepted by the question author.

I can't get my custom click event to work.

Hello. I have this class written. public class MyButtonSimple : Button { // Create a custom routed event by first registering a RoutedEventID // This event uses the bubbling routing strategy public static readonly RoutedEvent TapEvent =…

Developer technologies | Windows Presentation Foundation
Developer technologies | XAML
Developer technologies | 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.
875 questions
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-25T02:23:20.583+00:00
A N 81 Reputation points
accepted 2020-11-26T03:28:32.47+00:00
A N 81 Reputation points
1 answer One of the answers was accepted by the question author.

Input string was not in a correct format.

When i am inserting Decimal value from textbox to gridview asp.net Webform, then below error is coming , Input string was not in a correct format. Below line int price = Convert.ToInt16(txtprice.Text); My Code for inserting data into gridview is…

Developer technologies | ASP.NET | Other
Developer technologies | ASP.NET | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
3,643 questions
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-25T12:43:12.727+00:00
Analyst_SQL 3,576 Reputation points
accepted 2020-11-25T14:11:05.693+00:00
Analyst_SQL 3,576 Reputation points
0 answers

StatusCode: 404, ReasonPhrase: Not Found', Version: 1.1

i need help i keep getting this error locally it works when posting an image through post man but from my xamarin forms app to the local iis server i get this error {StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content:…

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-24T07:34:04.987+00:00
Ahmad salim 56 Reputation points
commented 2020-11-25T08:54:51.43+00:00
Anonymous
1 answer

C# Rest api

Hello, i made an Rest api in .net Core while i ran the api on local it worked fine, but from the moment i published it the /api/Page Doesnt work i get a removed error, i found (i think) this is because there is no www.root in my project ? but i'm…

Developer technologies | C#
Developer technologies | 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.
11,748 questions
asked 2020-11-23T21:33:39.413+00:00
Leandro Ostyn 6 Reputation points
answered 2020-11-24T18:45:16.647+00:00
Leandro Ostyn 6 Reputation points