10,561 questions with C#-related tags

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

Datagridview insert new Row after First

Hi, Please I need help , as I am using datagridview when user press enter key its move to next cell instead of new to new row when its reach to last cell upon user enter key on last cell or row its move to new row, the following code is insert new row…

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,561 questions
asked 2020-11-30T18:26:09.073+00:00
Malik Asad Mahmood 126 Reputation points
accepted 2020-12-05T17:03:29.377+00:00
Malik Asad Mahmood 126 Reputation points
2 answers One of the answers was accepted by the question author.

How do we handle Data Row and its column value in another procedure class file from data table using c#

I have employee data table. In that, every row contains more than 100 columns. It's very difficult to handle the same main page all the columns of every row. In that case, Hoe do we pass all column values for processing in separate procedure…

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,561 questions
asked 2020-12-01T15:55:43.07+00:00
Gani_tpt 2,092 Reputation points
accepted 2020-12-05T01:14:51.303+00:00
Gani_tpt 2,092 Reputation points
0 answers

directoryInfo.CreationTime

How do I get the directoryInfo.CreationTime and the Filename in the ListBox (FileList) with Item Text and the Value. I want to display the filename and need the date for something else. private void BindFileNamesToList() { string…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,394 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,561 questions
asked 2020-12-02T19:59:07.84+00:00
Qamar, Mo 106 Reputation points
commented 2020-12-04T20:20:05.207+00:00
Malam Malam 226 Reputation points
2 answers

Task.Run without wait ?

In .NET core 2.0 application, have requirement to run task in a background. 1 option is to use IHostedService, However can use Task.Run(() => DoSomething(a,b,c)) without wait ? I got to know it is risky, as if any exception occurred in the…

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,561 questions
asked 2020-12-04T05:56:45.903+00:00
Omkar Pimplekar 1 Reputation point
answered 2020-12-04T18:37:20.577+00:00
Karen Payne MVP 35,291 Reputation points
1 answer

I need a parameter that implements multiple interfaces,How should the code be represented?

interface IA { int DoA(); } interface IB { int DoB(); } These are two interfaces. My method needs to implement the parameters of both interfaces. Is there any way to restrict the caller? I've thought about a lot of things That I can think…

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,561 questions
asked 2020-12-04T10:47:17.157+00:00
卡卡 1 Reputation point
answered 2020-12-04T17:52:36.6+00:00
Collin Brittain 36 Reputation points
1 answer One of the answers was accepted by the question author.

How to invoke an API

Can anyone help me....... I'm a fresher and I'm unable to invoke an API in C# code. Could anyone give an answer for this question.

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,561 questions
asked 2020-12-01T15:30:28.217+00:00
Mohd Muzaffar Ahmed 21 Reputation points
commented 2020-12-04T11:48:13.683+00:00
Mohd Muzaffar Ahmed 21 Reputation points
1 answer

Visual Fox Pro oledDB provider error "No value or one or more paramter required" in reading DBF ukranian files in execute reader()

Dear Team, We are using VFPOLEDB data provider. We need to read the DBF file and convert this into CSV file. we are using VFPOLEDB.1 data provider to read the ukraninan file name ПолесьеПродукт_Товары.DBF. While executing line execute reader(), we are…

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,561 questions
asked 2020-12-01T16:03:51.79+00:00
Deepan Chakravarthy 1 Reputation point
commented 2020-12-04T08:41:52.313+00:00
Timon Yang-MSFT 9,576 Reputation points
1 answer One of the answers was accepted by the question author.

algorithm find how long each segment of a path will take at a constant speed

Hey guys! so I have a little issue I am trying to solve. my concept has a picture box where you can add points to a list List<pointf>, and it draws the lines as a path on the picturebox. however now I need to work out for an imaginary…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 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,561 questions
asked 2020-12-04T02:37:58.55+00:00
James 21 Reputation points
commented 2020-12-04T08:28:39.663+00:00
James 21 Reputation points
1 answer

Console App (.NET Core) Issue

My new organization has an internal web app for product maintenance and reporting. A server was changed out and parts of the app need to point to the new data source. I updated the IP address of the existing connection to point to the new server in…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,338 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,814 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,561 questions
asked 2020-12-03T14:35:58.73+00:00
Jared Severson 1 Reputation point
commented 2020-12-04T03:06:42.383+00:00
Dylan Zhu-MSFT 6,406 Reputation points
4 answers

Add Multiple control type in DataGridView in winforms c#

Dear Friends, I want to display the DataGridView like below in winforms c#

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 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,561 questions
asked 2020-11-30T14:30:48.53+00:00
Tejas GC 6 Reputation points
answered 2020-12-04T02:26:54.193+00:00
Daniel Zhang-MSFT 9,621 Reputation points
1 answer One of the answers was accepted by the question author.

How to make edge browser show in front of my UWP app?

Hello, This issue was related to UWP app and c# console application. I made a simple server by using c# console application. And my UWP will run in full-screen mode and connect to it. My console application will start a process to open the edge…

Universal Windows Platform (UWP)
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
325 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,561 questions
asked 2020-11-20T06:49:28.85+00:00
Xie Steven 811 Reputation points
commented 2020-12-04T02:08:06.367+00:00
Xie Steven 811 Reputation points
4 answers

Stored procedure called once, but executed twice.

I'm using System.Data.SqlClient.SqlCommand.ExecuteNonQuery() to execute a stored procedure in SQL Server 2012. From my application log, this execution has been called only once (it writes log for each calls), but, I realized the store procedure…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,565 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,184 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,561 questions
.NET Runtime
.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,136 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,591 questions
asked 2020-12-02T13:47:02.257+00:00
Wong 6 Reputation points
commented 2020-12-04T01:48:16.447+00:00
Shai Cohen 1 Reputation point
1 answer

AES-256 Encryption

Hi, I Need to know is there a common AES-256 algorithm which support Encryption and decryption from Both C# and SQL server ? 1) Master Key 2) Certificate 3) Symmetric Key 4) EncryptbyKey Above are already in place in the database for specific…

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,561 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,591 questions
asked 2020-12-03T08:09:07.237+00:00
Abhishek Rao 1 Reputation point
commented 2020-12-04T01:45:42.767+00:00
Cheong00 3,471 Reputation points
3 answers

C# method listbox or combobox as parameter

Hi all, First time at MS Q&A I am using VS2015 and C# I have code that loads data into a listbox. No problem, it work fine. Now I need a second method that loads the same data into a combobox. I recall that there was a way to pass the list…

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,561 questions
asked 2020-12-03T21:07:44.897+00:00
Saga 426 Reputation points
answered 2020-12-04T00:06:40.143+00:00
Saga 426 Reputation points
1 answer

C# Console Delete Directory With any username

Ok so basically I am making a spoofer to unban you from FiveM and its going good and it works but not everyone is gonna have my username on my desktop so for example if its C:/Users/nicov/ and theres is C:/Users/richard/ it wont delete the folder for…

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,561 questions
asked 2020-12-03T05:28:37.74+00:00
Nico Verdetto 1 Reputation point
answered 2020-12-03T14:05:33.377+00:00
RLWA32 42,366 Reputation points
0 answers

Get SCCM Software Center Applications using CIMSession

UPDATE : @TimonYang, First of all thank you for your quick reply! Regarding to the error, if you didn't import the required reference yet, you should import it from : …

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,561 questions
asked 2020-12-02T13:08:50.133+00:00
Torres Joao 1 Reputation point
commented 2020-12-03T11:15:54.107+00:00
Torres Joao 1 Reputation point
0 answers

HttpWebRequest.BeginGetResponse method

Hello. I have carefully read the code example at https://video2.skills-academy.com/ru-ru/dotnet/api/system.net.httpwebrequest.begingetresponse?view=net-5.0#----------- and tried to run it. It worked fine, but i wanted to test TimeoutCallback (when…

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,561 questions
asked 2020-12-02T11:50:44.64+00:00
Maxim Bulatov 1 Reputation point
commented 2020-12-03T09:51:31.777+00:00
Timon Yang-MSFT 9,576 Reputation points
2 answers One of the answers was accepted by the question author.

Avoid "src" in autonamatic namespace

Hello, is still necessary to have "src" included in automatic namespace? I found this topic was solved years ago here: …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,814 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,561 questions
asked 2020-12-02T08:44:39.22+00:00
Radim Langer 101 Reputation points
accepted 2020-12-03T08:26:24.62+00:00
Radim Langer 101 Reputation points
1 answer One of the answers was accepted by the question author.

question about Static method/class with where T : class,new(), what does it mean

Hi I am studying an example project and one class is like this: public class ClassDB<T> where T : class,new(), { public static IEnumerable<T> ExecuteGetList(T whereModel) } And in another class(classA) , the code is …

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,561 questions
asked 2020-12-03T07:49:24.393+00:00
Martin Wang 106 Reputation points
commented 2020-12-03T08:24:46.667+00:00
Martin Wang 106 Reputation points
2 answers One of the answers was accepted by the question author.

Direct access to object properties from another window without creating a new window

Hi First and foremost, I apologize for my grammatical errors; my first language is Persian (Iran). In my project (WPF) i have many windows. in window form i have no problem to access object property from Another window With following codes for…

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,705 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,561 questions
asked 2020-12-01T15:10:55.083+00:00
رضا جافری 1,291 Reputation points
accepted 2020-12-03T03:58:38.64+00:00
رضا جافری 1,291 Reputation points