C# (pronounced "C-sharp") is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java.
Question:How to get the time difference between utc time and local time in C#?
Description:I have .net base website which currently have server time zone set to GMT+5, I need to extract that 5 from it dynamically so that once I change the time zone of the server or deploy the same site on another sever with different time zone, I should be able to extract that time difference in that case.
Posted by: Umer khan | Posted on: Sep 11, 2020
Question:How to convert list of lists to single list in c# using lambda expression?
Description:I have records coming from database where each item can have multiple TagIds(List<string>) assigned to it. I have combined the lists but currently it has become a list of lists as shown below, List<List<string>> listOfLists=databaseQueriedItems; but I need the items in one list like following one(i.e I want to flatten the hierarchy) List<string> singleListOfStrings;
Posted by: Umer khan | Posted on: Aug 29, 2020
Question:How to check if the flags enum value has/contains other flags enum values in c#?
Description:For example I have Following flags enum and I have stored a number 7 in the database now I have to check if 7 contains the requested number let say 3(which is for OptionOne and OptionTwo) it should return true, in this way I have to compare a single int value with a single int value for the following flag enum. [Flags] public enum MyFlagsEnum { None = 0, OptionOne = 1, OptionTwo = 2, OptionThree = 4, }
Posted by: Junaid Aziz | Posted on: Aug 21, 2020
Question:Need to create a .net core web api using MongoDB as backend storage database?
Description:I am new to .net core and mongodb as well. I have prior experience of using .net and mssql can anyone suggest me a complete working example, so that I can get an idea about the architecture of such asp.net core api.
Posted by: Umer khan | Posted on: May 22, 2020
Question:how to get the last column used/last column that has some data in a excel file programmatically by using C#?
Description:I need to iterate through a single row where I don’t know the end range as I have a dynamically generated excel file which might have different number of columns used every time. I am using following code, taken from reference code List<string> myValue = new List<string>(); //unknown end Range //need to get the Last data filled column or Last Column used in the following line string endRange="D1"; foreach (Range row in sheet.Cells.Rows.Range["A1", endRange]) { Range cell = (Range)row.Cells[1, 1]; if (cell.Value2 != null) { myValue.Add(Convert.ToString(cell.Value2)); } }
Posted by: Peter Andre | Posted on: Jan 22, 2020
Question:How to dynamically generate sitemap xml for an asp.net mvc website?
Description:I have a website developed using asp.net mvc (c#) which contains some static pages and also some dynamic pages i.e where the content is fetched from database and is dynamically increasing as well, So I need to build such a sitemap for which I need to code for once and it take care of the future items that needs to be included in the sitemap.
Posted by: Khalid Abbas | Posted on: Jan 21, 2020
Question:How to get the list of all available powerpoint control’s ids?
Description:I need all available powerpoint (currently i am using office 2016) control ids as I have to utilize them for development purpose. it will be good if i can have ids for older versions of powerpoint which might be useful to avoid any compatibility issues.
Posted by: Samantha Jones | Posted on: Jan 21, 2020
Question:Iterate through a single specified row of an excel sheet using vsto in C# code?
Description:I have a excel sheet and I need to create a list containing all the values of the specified row or specified range!
Posted by: Samantha Jones | Posted on: Jan 15, 2020
Question:How to update Legend / series text of powerpoint chart using VSTO in C#?
Description:I am dynamically adding series items but the series/Legend items always showing text as series1,series2 and so on… but let say I want to update them as my series 1, my series 2, and so on. I am clueless as there is very less information available regarding the topic.
Posted by: Samantha Jones | Posted on: Jan 10, 2020
Question:convert my json object to csv downloadable file using jquery or javascript?
Description:I want to convert my json object to csv downloadable file for excel, I am having a simple list of submitted forms and the data is coming in the form of json against a ajax request on a controller method in C# ,that is why i want to convert my json on client side through jquery or javascipt.
Posted by: Umer khan | Posted on: Dec 12, 2019