10,277 questions with C#-related tags

Sort by: Updated
0 answers

How to create RunAndSave Assembly using System.Reflection.Emit in .NET 6?

In the .NET 6 documentation for the AssemblyBuilder class in System.Reflection.Emit there is an example of how to build an assembly. The example can be made to compile and work in .NET 6 by changing AssemblyBuilder ab =…

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,277 questions
asked 2021-12-24T20:47:15.937+00:00
Nicholas Piazza 531 Reputation points
commented 2021-12-24T21:43:51.917+00:00
Viorel 112.5K Reputation points
4 answers One of the answers was accepted by the question author.

How to get original data before decryption ?

I work on csharp I need to get data before decryption but i don't know how to do that data decrypted on file as below : ˆU*o" ى,be~ùث »وچٍ­اàےي¾أ(هشْé Pشم¢×l. ZS’ى² N· ¾«é¬Q غتُ ’ذi,اGNِء”©¢¼î¨C2‡ ùu35Yôy ¾إ ً¼@پ6¹qv¹آœإûج 4 Hu؟¼إ‘{‏]…J î‚üد*ڈ…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 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,277 questions
asked 2021-12-13T00:07:07.967+00:00
ahmed salah 3,216 Reputation points
accepted 2021-12-24T20:44:26.507+00:00
ahmed salah 3,216 Reputation points
1 answer

missing logic to the LINQ query which does not work

public IHttpActionResult InsuranceLimit(InsuranceLimitDTO IL) { var result = from b in db.InsuranceTransferAcc where b.UserId == IL.UserId select b.CreatedDate; } This above query (result ) is returning me empty. Not understanding what I am…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,756 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,277 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,554 questions
asked 2021-12-24T08:54:58.617+00:00
Rock Hitman 46 Reputation points
commented 2021-12-24T19:43:35.92+00:00
Karen Payne MVP 35,036 Reputation points
1 answer One of the answers was accepted by the question author.

Is it ok to use HttpRequestMessage.properties in .net core 3.1?

Hi, I'm using HttpRequestMessage properties property in order to pass auth type in the request so that the message habdler will generate the correct authorization heade (basic, jwt, etc...) Is it good approach? Another thing I saw the Properties…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,187 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,277 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,125 questions
asked 2021-12-21T22:36:00.037+00:00
Nishi-nishi 21 Reputation points
commented 2021-12-24T13:47:03.11+00:00
Nishi-nishi 21 Reputation points
2 answers One of the answers was accepted by the question author.

A general class to manage threads

Dear All, I am a beginner in C#. I want to create a class which can insert into any project for managing threads. However I don't know how to do it. Could anybody help me?

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,277 questions
asked 2021-12-22T14:45:54.673+00:00
BenTam 1,561 Reputation points
accepted 2021-12-24T09:59:29.217+00:00
BenTam 1,561 Reputation points
0 answers

How do I set DBF column value to NULL (blank) when using VFPOLEDB and C#?

I have created a WPF application that is to maintain existing DBF files. These files are also used by another legacy application so I cannot migrate the data to SQL server or other more current DB. Some of the DBF tables have columns whose values are not…

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,277 questions
asked 2021-12-23T23:55:06.11+00:00
Leo Ayala 21 Reputation points
commented 2021-12-24T08:06:47.013+00:00
Viorel 112.5K Reputation points
2 answers

LINQ Query for checking Time duration

I have a sql table which has column as below I want to have a LINQ query to check, when InsuranceID is passed as a input parameter, the logic needs to check for that particular InsuranceID if the CreationDate is >24 hrs return as True else return…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,756 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,277 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,554 questions
asked 2021-12-22T23:32:06.757+00:00
Rock Hitman 46 Reputation points
answered 2021-12-24T07:58:04.15+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
1 answer

How to implement OPC UA Client and OPC UA Server software in C#?

Hi, How to implement OPC (Open Platform Communication Unified Architecture) UA Client and OPC UA Server software using C#.Net? Please help me on this.

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
323 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,277 questions
asked 2021-12-23T11:00:01.917+00:00
SUBRAMANIAN Prabhakaran 1 Reputation point
commented 2021-12-24T06:11:49.813+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

activex control can't create object c# dll in windows 10/7

hi MS Team, i created a dll with vs2015 in c# in windows 7 32 bits and working fine up to now. i changed my pc where i created the dll to new laptop windows 10 64 bits . now iam trying to improve the last dll to resolve some errors but it work fine…

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,277 questions
asked 2021-12-17T00:25:09.057+00:00
Fouad.Allali 21 Reputation points
accepted 2021-12-23T18:07:15.397+00:00
Fouad.Allali 21 Reputation points
1 answer

How to use merge sort to sort a int list?

I have a int list and want to get the result how to get it ? it is a sort and get the each line list in the sort algorithm. and another result

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,277 questions
asked 2021-12-23T13:01:24.537+00:00
mc 3,701 Reputation points
answered 2021-12-23T17:33:34.603+00:00
Bruce (SqlWork.com) 56,686 Reputation points
1 answer

VS2019 debugger unable to watch a resource but the local variable obtains the value with no problem

In the project properties Build Events I use echo %date% %time% > "$(ProjectDir)\Resources\BuildDate.txt" To update the build date the file, "BuildDate.txt" was added in the project properties to the Resources collection as a…

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,277 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
945 questions
asked 2021-12-23T14:31:04.667+00:00
Joseph Stateson 46 Reputation points
answered 2021-12-23T16:03:56.113+00:00
Michael Taylor 48,576 Reputation points
1 answer

How to get specific Rows count and value from an excel sheet tab 3

Hi, i have to get datas from 3rd colom of 3rd tab in an excel sheet.For all 3 tabs i have same number of rows.So when i tried to copy 3rd colom data always copying first colom data.I need to save only colom 3 value and heading save in to .txt file.How…

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,277 questions
asked 2021-12-14T12:51:28.837+00:00
RAMAN RAGAVAN 51 Reputation points
commented 2021-12-23T09:41:16.487+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
0 answers

'Method is not implemented' error is displayed when clicked on 'Cancel' button.The throwing of WizardCancelledException doesn't work

protected override void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) { BaseTestTools defaultTestTool = BaseTestTools.Default; …

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,277 questions
asked 2021-12-14T16:19:24.54+00:00
vaibhav4242 1 Reputation point
commented 2021-12-23T09:40:09.387+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
1 answer

c# help ..1)I want to collect items Emp_add ? 2)I want to delete an employee with his data?

int emp_id; string Emp_Name; int Emp_Salary;//cost salary in one hour double Emp_Department;//number hours work double Emp_add;//hours add double Emp_total; double Emp_tax;//clcluter tax in end month double Emp_inmonth;//salary after tax …

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,277 questions
asked 2021-12-16T22:31:37.107+00:00
kelam myn 1 Reputation point
commented 2021-12-23T09:37:16.84+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to use string interpolation in foreach loop ?

Hi All, Please help me to format the string with 'string Interpolation'. Below is my foreach loop code with string + concatenation. I want to avoid + concatenation and use 'string Interpolation' int itemsCount = oUpdateVarList.Count(); …

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,277 questions
asked 2021-12-23T04:50:08.96+00:00
Binumon George 21 Reputation points
accepted 2021-12-23T07:27:46.027+00:00
Binumon George 21 Reputation points
1 answer

ASP.NET_SessisonId change

I want to maintain different asp.net sessionid before and after login. please give solution for this . Thank you,

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,270 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,277 questions
asked 2021-12-23T02:19:53.48+00:00
Maria Melnichenko 1 Reputation point
answered 2021-12-23T05:54:31.883+00:00
Lan Huang-MSFT 25,636 Reputation points Microsoft Vendor
1 answer

DataTables and DataRows - Convert Single Item Array into Object

Beginner question so hopefully easy. I am developing a Web API in C# to get products from a database. Behind it is a stored procedure that takes some parameters including a page number and returns two tables. One of them is up to 100 results along with…

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,277 questions
asked 2021-12-23T00:41:38.303+00:00
WillPage 101 Reputation points
answered 2021-12-23T02:48:54.897+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
1 answer

SetupDiGetSelectedDriverA return an empty object

Hi! I'm using SetupDiGetSelectedDriverA to get the driver version but I get an empty driver object. var guid = Guid.Empty; var devInst = IntPtr.Zero; var driver = new SP_DRVINFO_DATA(); IntPtr hDevInfo =…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,426 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,277 questions
asked 2021-12-12T08:01:17.747+00:00
Phani 46 Reputation points
commented 2021-12-22T18:13:06.517+00:00
Phani 46 Reputation points
1 answer

Word add-in

Plugin that summarizes a Word document in C#

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,277 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,508 questions
asked 2021-11-16T21:26:33.433+00:00
Muhammet Aydeniz 1 Reputation point
answered 2021-12-22T17:21:05.407+00:00
Muhammet Aydeniz 1 Reputation point
5 answers

Need to create sample worker service in .Net 6.0

Can anyone help me to create a sample worker service in .Net 6.0 ? If any sample is there please provide me

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,277 questions
asked 2021-12-19T05:14:54.253+00:00
Sachi 221 Reputation points
answered 2021-12-22T15:59:28.517+00:00
Sachi 221 Reputation points