Click here to Skip to main content
15,886,919 members
Everything / .NET / .NET4.6

.NET4.6

.NET4.6

Great Reads

by Altaf Ansari
SignalR Real-Time ChatApp with Emoji / Smiley and sending file attachment
by Yaseer Mumtaz
This article helps to understand the architecture and use of simple data grid developed in Angular 4.
by Igor Ladnik
Basic infrastructure for massive continuous data acquisition and processing using ZooKeeper-Kafka and Redis
by honey the codewitch
An LL(1) pull parser and generator that thinks it's an LL(k) parser - with a rich, simple and beautiful EBNF syntax

Latest Articles

by NikStar
Using OutgoingMessageProperties and OperationContextScope to implement authorization by http header for WCF client that communicates with non WCF-based web services.
by Shao Voon Wong
Bring your animations to H264/HEVC video using C++ and C# with h/w acceleration
by #realJSOP
This library is intended for use in a multi-environment system, but it certainly be used under less stringent environmental confines, even down to a single desktop machine taht needs to connect to a single database server.
by #realJSOP
For those times when you need more control over when a modeless window is created/displayed

All Articles

Sort by Score

.NET4.6 

18 Sep 2018 by Altaf Ansari
SignalR Real-Time ChatApp with Emoji / Smiley and sending file attachment
10 Jul 2017 by Yaseer Mumtaz
This article helps to understand the architecture and use of simple data grid developed in Angular 4.
15 Feb 2018 by Igor Ladnik
Basic infrastructure for massive continuous data acquisition and processing using ZooKeeper-Kafka and Redis
14 May 2019 by honey the codewitch
An LL(1) pull parser and generator that thinks it's an LL(k) parser - with a rich, simple and beautiful EBNF syntax
1 Dec 2019 by Dan Ionescu (USINESOFT)
Complex cascade defaulting of properties on an object graph triggered by other property changes
31 Mar 2019 by honey the codewitch
A Non-Backtracking Regular Expression Engine for .NET (Core)
3 Mar 2018 by Athari
CsConsoleFormat library for .NET - Formatting in Console using modern technologies
20 Apr 2018 by Eric Lynch
Part 3 in the LINQ series, this provides an introduction to IQueryable, IQueryProvider, and LINQ expression trees.
15 May 2018 by Eric Lynch
Extends .NET reflection to decode the byte array returned by System.Reflection.MethodBody.GetILByteArray(), discusses the techniques to achieve this, and provides a brief primer on .NET reflection.
7 Jun 2018 by Habibur Rony
This article mainly covers how to create new build and release definition using VSTS. There are short descriptions of DevOps, continuous integration, continuous delivery and continuous deployment.
20 May 2018 by Eric Lynch
In this article, we explore the implementation of a Visual Studio editor that allows editing of a fictitious "Colorful" language. The editor minimally implements both syntax classification / coloring and IntelliSense completion.
18 Feb 2021 by #realJSOP
A WPF ListView that automatically generates columns (that are also sortable) based on decorated entity properties
7 May 2017 by Jung Hyun, Nam
Introducing NConcern, a free open source compile-time AOP framework
21 Jun 2017 by M.M.Mohseni
In this sample code, we are going to upload a file via a web method asynchronously.
9 Sep 2018 by Nick Polyak
Drag and drop using NP.Visuals package
8 Oct 2018 by outbred
Design, implementation, and usage of the oops framework
9 Jun 2020 by Chris Copeland
A managed library for automated dependency injection, contract validation, and custom aspect-oriented decorator implementations
1 Apr 2019 by honey the codewitch
Code for parsing, querying, and emitting JSON or a JSON superset
20 Aug 2019 by honey the codewitch
Using PCK to create grammars, parsers and tokenizers for C# and other .NET languages
1 Mar 2021 by #realJSOP
For those times when you need more control over when a modeless window is created/displayed
9 Mar 2021 by #realJSOP
This library is intended for use in a multi-environment system, but it certainly be used under less stringent environmental confines, even down to a single desktop machine taht needs to connect to a single database server.
13 Mar 2017 by Akkilz
How to generate Jwt security token for Application pool identity or logged on user using OAuth 2 from ADFS
31 Jan 2018 by Pawel idzikowski
How to replace the web API request query string to provide case insensitive OData search
6 Jun 2018 by Richard Deeming
If you want to stick with this inefficient approach, you'll need the JSON property names to be prefixed with the "@" character: public class SyncActivity { [JsonProperty("@MemberId")] public string MemberId { get; set; } [JsonProperty("@UserId")] public string UserId { get;...
26 Sep 2018 by MattiLindroth
An example on how to call Oracle stored procedures with UDTs from ASP.NET MVC / REST API
3 Dec 2018 by replaysMike
How to binary serialize your classes without having to modify them
4 Apr 2019 by Thomas Daniels
What you can do is edit the Main method of your WinForms application and if you receive a certain command-line argument, say /checkOnly, then only call the StringFormat_check method: [STAThread] static void Main(string[] args) { if (args.Length > 0 && args[0] ==...
7 Oct 2019 by Florin Pănescu
This example shows how to use SharpCompress library with TreeView & ListView.
30 Mar 2017 by Garth J Lancaster
Have you tried the 'IN' SQL operator ?select * from tablewhere userID=@UserIDand number in (1005, 1009, 1012, 1017)
14 Nov 2017 by jgauffin
Save time and effort with the help of codeRR, which finds and analyses errors for you, improving code quality along the way.
25 Apr 2018 by Richard Deeming
Looking at your screen-shot, the CurrentMeterReading field is an integer in one table, and a floating-point number in another. The Field extension method does not attempt to change the type of the source field. It simply tries to unbox it to the requested type. If the source type doesn't...
7 Oct 2018 by David A. Gray
This article demonstrates a class library that supports command line parameters with default values stored in application settings.
18 Oct 2018 by OriginalGriff
The problem is almost certainly that the DateTime format used on your development machine is not the same as that on the production machine - and Convert.ToDateTime uses the current machine setting as the format for the conversion process. I'd strongly recommend that you forget all the Convert...
18 Oct 2018 by Richard MacCutchan
Do not use Convert for such issues, use DateTime.TryParse[^]. This allows more control over the format of the date. Remember that date representations vary according to culture; e.g. in US date format, 31/01/2018 is not valid as 31 is the month field.
6 Nov 2019 by MadMyche
How hard is it to use Google: Google: aspnet mvc cms open source[^]
18 Jul 2020 by OriginalGriff
Because the language designers decided not to allow it. There is a deeper reason for this in that it adds a lot of complexity with not a lot of "real" benefit, and the reason for that is called the Diamond Problem: Multiple inheritance -...
7 May 2017 by Dave Kreskowiak
Posting the same question over and over again is not going to change the answer. You're not generating the barcode, some library you're using is. Your code cannot be made to go much faster. Frankly, the requirement is ludicrous. There's no way you're going to generate hundreds of thousands of...
16 May 2017 by Richard Deeming
You're trying to answer the wrong question. :) Don't try to find a way to use Javascript to close the browser window. Even if you find a hack to let you do that, it will be a bug in the browser, and will most likely be patched, breaking your script. Instead, use a different tool to make the...
22 May 2017 by Dave Kreskowiak
To target .NET 4.6.2, you have to upgrade your Visual Studio to 2015. VS2010 only supports through .NET 4.0.
1 Jun 2017 by F-ES Sitecore
You are trying to add an EmployeeRegistration class to a collection of Employee objects. Employees.Add needs you to pass an Employee object but you are passing EmployeeRegistration. If you want to add to the Employees you need to add an Employee object.
16 Jun 2017 by Dave Kreskowiak
Ummm...it seems you have no idea how .ZIP files work. Either that or you're doing a terrible job of describing the problem. The original path is not saved in the .ZIP. If you add folders to a .ZIP the RELATIVE path is saved. That means the files are unzipped to a path relative to where the...
11 Oct 2017 by Wessel Beulink
The system core is located at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.*.*\System.Core.dll I should just paste this lib down in your repo.
22 Dec 2017 by Richard Deeming
* Open the user control in the designer. * Select the tab control. * In the property grid, change the "Modifiers" to public. Or, open the user control's code file, and add a public property to get and set the width of the tab control. public int TabControlWidth { get { return...
30 Dec 2017 by David_Wimbley
Because in view source the HTML isn't populated that would indicate the HTML in the console is being loaded via ajax calls. Those calls, i believe, don't trigger if you are trying to download the HTML (which is what you are doing based on your code) which would explain why the html that you...
7 Mar 2018 by Wendelius
Since you already have the data in a datatable, one easy way is to use SqlBulkCopy class. Have a look at the SqlBulkCopy.WriteToServer Method (DataTable) (System.Data.SqlClient)[^]. There's a nice example how to write data to the server with this method. There are also quite a lot of articles...
25 Apr 2018 by Maciej Los
Using IMEX=1 in connection string - admittedly - avoids crashes during the process of retrieving data for mixed data columns, but it causes OledDb provider to treat data as a text. More details, you'll find here: Microsoft ACE OLEDB 12.0 Connection Strings - ConnectionStrings.com[^] I'd remove...
21 May 2018 by Dave Kreskowiak
Not directly, no. You would have to add the libraries to a project to see them in Object Explorer. There are TENS OF THOUSAND of types (classes/structs/enums/other) in the .NET Framework alone. Add ADO.NET, ASP.NET, MVC, Entity Framework, ... and you're probably going to clear 100,000 types. ...
19 Aug 2018 by OriginalGriff
Start with google: decompress 7z password protected files c# - Google Search[^] The top link alone shows you what to do: c# - SevenZSharp Decode with password - Stack Overflow[^]
27 Aug 2018 by Jochen Arndt
A rather old article: A Smart Card Framework for .NET[^] and a more recent project: GitHub - danm-de/pcsc-sharp: PC/SC wrapper classes for .NET, written in C#[^] How to read the data from a specific card depends on the card type. You have to get the specifications and use the APDU commands...
11 Sep 2018 by CHill60
The Microsoft Documentation has an article specifically on the order of events - Order of Events in Windows Forms | Microsoft Docs[^] EDIT after OP comment One way to track the order of events in controls or objects is to log them - you will need to use the IDE to generate the code stub for...
28 Nov 2018 by Dave Kreskowiak
500 errors mean your server-side code crashed or otherwise threw an error. Unless YOU go through some diagnostic steps on your own code and supply additional information in your question, NOBODY can tell you what's going wrong with what you've posted in your question. We only get to work with...
2 Feb 2019 by Ravi Bhavnani
"How to add usercontrol to a panel on mainform from another form" Don't do that! Instead, your "Add Campain" dialog should simply return the type of campaign the user wants to add. It should be the MainFrm's responsibility to react to that and add the necessary user control to itself. It's...
18 Feb 2019 by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.
3 Mar 2019 by Wastedtalent
You could do: returnImage.Save("C:\image.ext", ImageFormat.Jpeg); or bypass this bit and write the stream straight to a file using (var fileStream = File.Create("C:\image.ext")) { ms.InputStream.Seek(0, SeekOrigin.Begin); ms.InputStream.CopyTo(fileStream); }
16 Apr 2019 by Dan Ionescu (USINESOFT)
LINQ extensions that allow to describe and to safely query cached data
22 Jun 2019 by OriginalGriff
You can't. There are ways to request a read receipt - so when a message is looked at, you get told it happened - but ... most email systems either ignore it or ask the user directly if they want to return one. Why? Spammers. If spammers can tell an email address that is "in use" from one that...
8 Aug 2019 by RickZeeland
The modern (and recommended) way of doing things is using Tasks, see: Task Class (System.Threading.Tasks) | Microsoft Docs[^] If you want to know what is so great about Tasks, read this series of CodeProject articles: Task Parallel Library: 1 of n[^] You can use Task.IsCompleted to check if...
5 Aug 2019 by honey the codewitch
Use tasks (System.Threading.Tasks) instead of threads, that way you won't necessarily even allocate a thread for an operation. For example, a lot of your services are IO bound - waiting for HTTP request response cycles. You can do a kernel wait on that, suspending it, and running other code...
5 Aug 2019 by Gerry Schmitz
Add callbacks for each service's "completed" event. Start all services. In each callback, set an indicator that that service has completed. At the same time, check all other "service" indicators. When all indicators are set, all services have run, and the last callback can trigger the "all...
6 Aug 2019 by RickZeeland
The article you are referring too is too old, from 9 years ago. On Windows XP this would work but newer Windows versions simply do not allow Desktop interaction anymore.
21 Oct 2019 by Chris A. Johnson
Drag and Drop between Multiple Trees in Jquery using jstree
6 Nov 2019 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you. So we need you to do the...
12 Nov 2019 by OriginalGriff
Then raise an issue with the GitHub repository, not on an unrelated site: Issues · JanKallman/EPPlus · GitHub[^]
28 Jan 2020 by Richard Deeming
By default, ASP.NET will issue a 302 redirect to the error handler. You can change that by setting the redirectMode to ResponseRewrite:
20 Feb 2020 by Richard MacCutchan
I do not have time to analyse all your code, but the following looks a little odd: if(tcp != clients[i]) // if not the client we want ... ? { So if the item you find in your list does not match the one you are...
4 May 2020 by Ayyappan Ramachandran
An overview of custom authorization with user groups in MVC
20 Aug 2020 by Grid-Code
Hi All Developing an windows form application vb, Busy dragging an image bitmap from another control, want to drop this image at the mouse position on the picturebox. The error which i have is that when i drag over the picturebox with the mouse...
13 Nov 2018 by Prabakaran Rajendran
Setting up automated build and deployment for Windows service using Azure Pipeline
10 Mar 2017 by ahmed_sa
I work in windows form c# vs 2015 i need to get text of selected value of combobox inside datagridview i can added success in datagridview but cannot get text for it . I replaced by column already exist his name Country and become Country2 this code of combobox Actually...
10 Mar 2017 by Patrice T
Dear Ahmed,After asking 52 questions, you should have learned a few basic things.Building an app is like playing with Legos, your task is to put together standard pieces to get what you want.Quote:How to get selected text for combox box in datagridviewThis is 2 questions completely...
12 Mar 2017 by ahmed_sa
I work in report rdlc windows form applicationI face problem the top margin of matrix control different from first page to another pagesmeaningif starting of showing data from first page is start from 2cm from top of pagein another pages it start from 0.5 cm from top of pages...
28 Mar 2017 by Richard Deeming
Store your connection string in the application's configuration file:Connection Strings and Configuration Files[^]How to: Read Connection Strings from the Web.config File[^]How to get Connection String from App.Config in C#[^]That way, you won't need to recompile if you move the database.
30 Mar 2017 by F-ES Sitecore
In addition to IN, if it is a range you want to select thenWHERE userID >= 1001 AND userID
30 Mar 2017 by Richard Deeming
Quote:textbox have values 1002,1991,2007,3006so that how to select these valuesYou'll need to split the text, convert each value to an integer, and build up a parameterized SQL command using the IN operator:string text = YourTextBox.Text;string[] parts = text.Split(new[] { ',' },...
30 Mar 2017 by Sander Rossel
It was a VPN connection that redirects everything to HTTPS...I'm not usually on VPN, but lately I've been needing it on and off.I feel stupid for not noticing it now...Anyway, glad I know the problem.
7 May 2017 by CHill60
I suggest that you have multiple threads writing these barcodes - see Asynchronous Programming[^] As an aside, do yourself and everybody else a favour and stop using the automatically generated names for objects Class1, textBox1, textBox4 etc etc. They might mean something to you now but they...
7 May 2017 by Patrice T
In this line: txt = "UserID" + dt.Rows[0][0] + "FirmName" + dt.Rows[0][1] + "OrderNo" + dt.Rows[0][2] + "BtachNo" + dt.Rows[0][3] + "Quantity" + dt.Rows[0][4] + "ProductName" + dt.Rows[0][5] + "SerialNo" + Serial; , a big part is constant in the loop: "UserID" + dt.Rows[0][0] + "FirmName" +...
7 May 2017 by Jochen Arndt
As already suggested move any constant data out of the loop and avoid using local and temporary variables inside the loop (especially those using dynamic memory allocation like strings): int items = Convert.ToInt32(textBox1.Text); string txtBase = "UserID" + dt.Rows[0][0] + "FirmName" +...
16 May 2017 by Arthur Medeiros
Hey everybody, I have found many questions like mine in different forums, but I couldn't find an answer that actually helps to solve my problem in any of them. Basically, what I want is to open an URL through command prompt, it will open the browser, processes a webpage, and then I would like...
16 May 2017 by Richard Deeming
You don't. If the medium trust level is too restrictive, you need to get the hosting company to create and apply a custom policy: How To: Use Medium Trust in ASP.NET 2.0 ⇒ Step 3. Optionally Create a Custom Policy Based on Medium Trust[^] There's nothing you can do in your code to work around...
21 May 2017 by Maciej Los
Please, check this: How to: Target a Version of the .NET Framework[^]
18 Jun 2017 by RickZeeland
I don't know about DotNetZip, but 7zip can do it, you can call it with Process.Start(). Examples from 7zip help: 7z a archive1.zip subdir\ adds all files and subfolders from folder subdir to archive archive1.zip. The filenames in archive will contain subdir\ prefix.7z a archive2.zip .\subdir\*...
2 Jul 2017 by 9000605667
I am writing one .net API for Android, Ipad apps and Web application So i am little bit confusion which is suitable for above kinds of app. So Please give me guidance which can i pick to start (i.e) Web API (or) REST. Thanks, What I have tried: So Please give me guidance which can i pick to...
2 Jul 2017 by David_Wimbley
Web API is a framework capable of implementing/being RESTful. Rest isn't a framework its more a methodology for going about implementing your API. There are restful APIs and non-restful API's. You could create a Web API application that isn't restful, its up to you to make it restful. I...
3 Jul 2017 by F-ES Sitecore
You'll need an application running on the target PC that has some form of "listening" mechanism (usually a TCP/IP port) and the controlling PC would connect to that port on that machine and send instructions. The target PC will then receive the instructions and carry them out.
22 Jul 2017 by sommr0
Line 2960: this.Adapter.SelectCommand = this.CommandCollection[5]; Line 2961: CDS.ADDJOB_SELECTDataTable dataTable = new CDS.ADDJOB_SELECTDataTable(); Line 2962: this.Adapter.Fill(dataTable); Line 2963: return dataTable; Line 2964: } What I...
22 Jul 2017 by OriginalGriff
This is a generic error message, which can be caused by several things (and most of them aren't SQL related). See here: failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. - Google Search[^] and you will find most of teh common...
29 Aug 2017 by Ammar Shaukat
I’m currently working on a UWP app to work with scanners. This application is a POS app and reads barcodes. Windows 10 Provides its built in barcode scanner class. That is used for UWP apps but it is limited in functionalities. you can check it here. Window 10 barcode Scanner for UWP
21 Sep 2017 by Member 13297587
One of my C# windows application form has a functionality of downloading the data of entire form in a single excel sheet. The form has few labelboxes at the top which can be accepted as header of the form, in the middle portion of the form there is datagridview which fetches data using a...
21 Sep 2017 by Karthik_Mahalingam
Pick the required data from the Form and add those in the relevant area in the excel sheet. ClosedXML[^] would be the best choice to format the data inside the sheet. refer these ClosedXML Nicely Formatted Header Row – Justin Cooney[^] c# - ClosedXML. Adding DataTable to existing Excel...
10 Oct 2017 by Member 13454019
Hi all, i am triying to split a string starts with lower letter to end. Example: ABCd;d6523;SiBABC.R;s1;EEcUY i can split these string with ";" after that i have an array like arr[]={"ABDd","d6523","SiBABC.R","s1","EEcUY"} then i want to get value after lower lettters like;...
10 Oct 2017 by OriginalGriff
Try a regex: (?[^a-z;]+?)(?=[a-z;]|$) string txtLine = "ABCd;d6523;SiBABC.R;s1;EEcUY"; MatchCollection matches = Regex.Matches(txtLine, @"(?[^a-z;]+?)(?=[a-z;]|$)"); foreach (Match m in matches) { Console.WriteLine(m.Value); } Generates:6523 BABC.R...
15 Oct 2017 by kuldeepnageshwar
when i unload the project and load again my problem is solved automatically. by the way thanks once again.
18 Oct 2017 by Kornfeld Eliyahu Peter
Entity Framework Databinding with WinForms[^] Entity Framework in Windows forms part 1 sample in C# for Visual Studio 2013[^] Entity Framework in WinForms[^]
18 Oct 2017 by F-ES Sitecore
You don't have to do anything, but you have to appreciate the code is expecting to run within a web context, have access to a request\response\session etc, so not all code is going to work. If you have basic data access classes that just use EF then they should work, but you have to make sure...
23 Oct 2017 by MStet
In a C++ Implementation of DirectShow, I have added two graphs the the Graph Manager (response checks removed for simplicity). When I try to connect them using ConnectDirect and I get a "E_POINTER Invalid Pointer as a result". What am I doing wrong? CComPtr...
23 Oct 2017 by KarstenK
COM is weired, but the errors are helping you. Your message means that the input pointer is invalid or not correct for the desired action. Are you sure, that all calls before are OK. I dont like the line hr = pGraph->AddFilter(peconsCX3RDKwithOV5640,"e-con's CX3 RDK with OV5640"); And split...
12 Nov 2017 by GauravKrishn
Hi, I am using angular 4 in a .Net project in VS 2015 and the getting the following error message when application loads in the browser : Error: (SystemJS) Unexpected token ) at Object.eval...
22 Dec 2017 by Member 13479861
Hiii, I have created a windows form with two panels with width 25:75 ratio. That is 25 ratio is the sidemenu and the other panel is Main menu/screen of app.So i used usercontrol and dragged & dropped it on the Main screen of form when user clicks the respective button on the sidemenu then the...
1 Jan 2018 by Member 11602422
i want to save image which send from android and ios app into website folder and its path into database from web service asmx c# how to do this and send json success message when image save into database What I have tried: i want to save image which send from android and ios app into website...