Add a class to a console app?
C# Forums
by Maylar
2d ago
I'm trying to create a console application with C# and there's something that I obviously don't understand. I've added a class file (.cs) and put one method in it but I can't seem to reference it from the main function in the Program class. The class name is Class1. I can't instantiate a Class1 object instance. Why not? C#: namespace ConsoleApp1 { class Program { Class1 Tasks; static void Main(string[] args) { int retval = 0; int pause... Read more ..read more
Visit website
1219 Occurs
C# Forums
by patrick
4d ago
Hello I'm trying to copy a file from a shared folder. 1219 Occurs C#: using System; using System.ComponentModel; using System.Runtime.InteropServices; using System.Net; public class NetworkConnection : IDisposable { readonly string _networkName; public NetworkConnection(string networkName, NetworkCredential credentials) { _networkName = networkName; var netResource = new NetResource { Scope =... Read more ..read more
Visit website
How to release memory
C# Forums
by patrick
5d ago
Hello How does FtpWebRequest, WebResponse Release memory? I don't know how to free this(FtpWebRequest, WebResponse) memory. C#: FtpWebRequest Request = (FtpWebRequest)WebRequest.Create(url); ... Request.Close(); ?? C#: WebRequest Request = WebRequest.Create("http://www.con.com"); ... Request.Close(); ?? Thank you ..read more
Visit website
Changing the FontSize of the DataGridView ErrorText
C# Forums
by tim8w
5d ago
Is there a way to change the FontSize of the ErrorText displayed in DataGridView or a way to override the default behavior and draw it yourself? I assume that it is using the FontSize of the Row or Cell ..read more
Visit website
XSRF-Token
C# Forums
by DataKnight11
1w ago
Hello community, How is it possible to make http request for login in C#? When I try to make the http request with the POST protocol I cannot obtain the XSRF-TOKEN. Can anyone help me? var loginData = new { userName = username, systemCode = password }; var requestBody = new StringContent(JsonConvert.SerializeObject(loginData), Encoding.UTF8, "application/json"); HttpResponseMessage response = await _httpClient.PostAsync(url, requestBody)... Read more ..read more
Visit website
Service F9 BreakPoint Debuging
C# Forums
by patrick
1w ago
Hello F9 Breakpoint debugging does not work.. Service registration was completed normally. The service was successfully registered using installutil.exe. The scheduler also works normally. But F9 Breakpoint ->F10 debugging does not work ..read more
Visit website
I want to upload a Windows local drive file to a Linux server FTP.
C# Forums
by patrick
1w ago
I want to upload a Windows local drive file to a Linux server FTP. Do it in C#. Is it correct to enter this in this part? string FTP_Linux_Path = "FTP://201.50.215.32/test1"; <==== Linux Server FTP string FTP_Linux_user = "LinuxUser"; <==== Linux Server FTP string FTP_Linux_pwd = "LinuxPwd"; <==== Linux Server FTP string inputFile = "D:\\test1.txt"; <=== Windows Local Drive Folder C#: public static void FtpUpload() {... Read more ..read more
Visit website
Cant get my grid to display the data from my sql
C# Forums
by gussy81
2w ago
Hi i am struggling to get my gridview to return my data. nothing shows up. can anyone help? my two pages are as follows: ASP.net: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs" Inherits="WebApplication1.Dashboard" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Client Matters</title> <style type="text/css"> .auto-style1 { width: 15px; height: 13px; } table, th, td... Read more ..read more
Visit website
FTP error 501 Server cannot accept argument
C# Forums
by patrick
2w ago
Hello An error occurs. error : 501 Server cannot accept argument C#: using FluentFTP; string host = "100.12.32.40"; string user = "user1"; string pass = "pw1"; int port = 21; string sourcefolder = @"/test1"; string host1 = "200.10.31.21"; string user1 = "user2"; string pass1 = "pw2"; int port1 = 21; string dstfolder = @"/TEMP"; using (FtpClient cl = new... Read more ..read more
Visit website
Copy from FTP(12.50.100.21) to FTP(12.45.222.25)
C# Forums
by patrick
2w ago
Hello It is definitely From FTP To FTP. Copy from FTP(12.50.100.21) to FTP(12.45.222.25) I need sample code. Please give me a site with sample code for Copy from FTP(12.50.100.21) to FTP(12.45.222.25) Please Help me ..read more
Visit website

Follow C# Forums on FeedSpot

Continue with Google
Continue with Apple
OR