Please share some logic to find date difference between two dates which would ignore leap days, c# Subtract method includes the leap days. E.g. for startDat= 26
I am building a C# Windows application with 2 radio buttons for gender. I'm using a simple insert query to insert data in the database. Can anyone help me wit
I have just started working on c#, and was fiddling with some code sample that I got from some forum. This code is using a namespace using system.windows.forms
I have a UserControl which includes Datagrid. Inside Datagrid I've set EditingElementStyle with Textboxes that have ContextMenu for Copy/Paste commands. I need
I have a List<> which contains another List<> I need to find if a given value is present in any of the items in the innermost list. If match found,
I'm trying to use SendGrid's API to send Data to a Dynamic Template, and send that email to a customer. However, the email sends, but the data is never passed.
i have a numeric value in textbox which is retrieve from sql database, meanwhile i have unbound GridView with some rows. now i want to compare the textbox v
I am creating a testing program. The three main objects I have right now are Tests, Questions, and Answers. I have three tables in the database, tests, question
I tried the following but it just returns a screwed up array. T[,] ResizeArray<T>(T[,] original, int rows, int cols) { var newArray = new
I want to export current date along with radgrid data to the excel sheet. How can I do this? For exporting radgrid I am using following code: public void Expo
I am using these lines of code to check if the record exists or not. SqlCommand check_User_Name = new SqlCommand("SELECT * FROM Table WHERE ([user] = '" + txtBo
Let's say I have two model classes: public class People { public string FirstName {get;set;} public string LastName {get;set;} } Also have a class Phone:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Facebook; using Newtonsoft.Json; namespace facebook { class Pro
I am trying to mock a sub-process for my tests. I know I can return the input to the function I am mocking as such: Mock<MockedObject> mock = new Mock<
Part of my code-behind: object _sync = new object(); private async void OnKeyDown(object sender, KeyEventArgs e) { if (!Monitor.TryEnter(_sync)) return;
I would like to display image inside a gridview. My gridview is being filled like This: Front: <asp:GridView ID="GridViewProduct" runat="se
I am accesssing the Outlook 2010 cache using the below code and modifying it. Please let me know how i can udpate the entry back to inbox mail store. Microsof
I have a string like this: string val = "123-12-1234"; How can I replace the dashes using an empty string in C#. I mean val.Replace(char oldChar, newChar);
How can i parse this json without class in c#. I don't know what to use either an array or anything else. This is the json result i want to be parsed { "s
After adding WindowsRuntime to a WinForms-project, building the project fails with Error "Must use PackageReference". The build log is more precise: C:[...]\Vi