Generate excel files from a C# application
CSharp Forums » .NET Framework
by Anonymous
4d ago
I have an application that is accepting two .csv files as input, comparing them using employee Ids and generating two output files in excel format - new employees and removed employees. I am storing the data of input .csv files in hashtables. Storing the data in the following format- C#: <key,Value> <employee ID, Name*City*AccessCode*Role> I am then comparing both hashtables and determining what employees are new and what are to be removed. I am storing the final results also in a... Read more ..read more
Visit website
Console string input to hexdecimal
CSharp Forums » .NET Framework
by Huzo
4d ago
Hello everybody, I am new to C# and .NET framework programming so hold your horses. I am trying to send some hex data to IO port (USB). I am able to send fixes data ( byte[] send = {0x01,0x01,0x80 }). Now I would like to convert string input from console to byte array. I was able to find some solutions but they are a little bit confusing for me. I need this now to manually control the device, later I will incorporate a CSVHelper to read from CSV file and write to a new one. Solutions I... Read more ..read more
Visit website
Reading DataReader Results into Object with List property Help!
CSharp Forums » .NET Framework
by beantownace
1M ago
Hello all, I am trying to see what is the best way to handle this in a proficient manner. I have a SQLDataReader that is returning a flattened result set where I am trying to group the data and add to a List property a few of the fields in the result set. I found a forum post using IDataReader with SelectRows with Group but I am not seeing SelectRows as an option. The result set I get to avoid multiple query calls is a flattened reader return of data example query return: Customer1... Read more ..read more
Visit website
Dispose webView2
CSharp Forums » .NET Framework
by philip
1M ago
Hi good day! I'm displaying a pdf from local machine using webView2 from Microsoft.Web.WebView2 by Microsoft installed through Nuget Packages. Now I'm really confused should I manually dispose webView2? but it says that webView2 is managed resource base on chatGPT. I just want to make sure that the value put in the webView.Source is clean/managed when pdf is no longer displayed. Thanks in advance. Initialize webView.Source to pdf file in local machine: try { webView.Source = new... Read more ..read more
Visit website
Exception has been thrown by the target of an invocation.
CSharp Forums » .NET Framework
by GabrielAspirans
2M ago
Exception has been thrown by the target of an invocation.: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: Attempt to load an assembly from a network location that would cause the assembly to be sandboxed in previous versions of the... Read more ..read more
Visit website
Error while sending request
CSharp Forums » .NET Framework
by Mohamadshirzad
3M ago
Hi, I have a code which in windows 10 works properly but in windows 7 ,I recieve the error : An error occurred while sending the request. System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) mscorlib My code: ``` System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12... Read more ..read more
Visit website
FatalExecutionEngineError Occur after DllImport
CSharp Forums » .NET Framework
by parker1107
3M ago
I have a Delphi DLL(x64) that provides a method to log in to the server. I tried to add this method in a specific SDK. (COM Visible=true,select x64 for the platform) Here is Delphi Code: Function LoginLic(sFD,sVD,sINI,sCh,sSD: string) : PWideChar; stdcall; var sysServer,sysPort,sysLN,sysCN,sysIP,sysMac,sysDN,sysFN,sysFV,sysSN, sFile,sHost,sPort,sSN, sTempPath : string; myIni : TIniFile; begin { example: [Connection] HostName = 192.168.1.187 Port = 220 } sHost := '127.0.0.1'; sPort :=... Read more ..read more
Visit website
Help with data not showing in DGV
CSharp Forums » .NET Framework
by Jfisher387
3M ago
I am creating a DGV and filling it with data from a dataset. I have done this several times within this application and did not run into the issues I am now. basically the goal is to search through the data for a "Status" of "Active", and then check that the sales rep string matches. once this happens add that data to my list. after it reads through the entire datatable it sets the data source. my issue is that 3 of the fields are just empty all the way through. I cannot figure out why some... Read more ..read more
Visit website
Compiler reached end of method but it jumps back to middle of it
CSharp Forums » .NET Framework
by OmriDulla
5M ago
Compiler is reaching end of method but its jumping back to line 129 and doubling my sum, at the moment I solved it deviding sum by 2, where is the problem ..read more
Visit website
How to pass extra parameter to PRintPageEventHandler
CSharp Forums » .NET Framework
by Jfisher387
5M ago
I am trying to print a page for each item within my BindingList. I'm all but there. but struggling to work out how to pass the item from the list without getting an error. Below is the code I am currently at. My error is on line 15 i get "There is no argument given that corresponds to the required parameter 'ev' of 'JB_Helper.pd_PrintPage(object, PrintPageEventArgs, JB_Helper.JobData)' Loop for item to print: private void btn_Print_Click(object sender, EventArgs e) { //Adds data from each... Read more ..read more
Visit website

Follow CSharp Forums » .NET Framework on FeedSpot

Continue with Google
Continue with Apple
OR