Posts

Showing posts from January, 2018

FTP - Server in C# FtpWebRequest

Image
Hi All, Here is an example how to use the FtpWebRequet Video: Code: using System; using   System.ComponentModel; using   System.Windows.Forms; using   System.Net;// need to added using   System.Threading; // need to added using   System.IO;// need to added namespace WindowsFormsApp2 {     public partial class FTP : Form     {         public string Username;         public string Filename;         public string Fullname;         public string Server;         public string Password;         public string path;         public string localdest;         public FTP()         {             InitializeComponent();             if (checkdown.Checked == true)       ...

SFTP download - upload

Image
Hi All, here is the code for the sftp class to download and upload. Video Code: using System; using   System.Collections.Generic; using   System.ComponentModel; using   System.Data; using   System.Drawing; using   System.Linq; using   System.Text; using   System.Threading.Tasks; using   System.Windows.Forms; using   System.IO; using   System.Net; using   WinSCP; using   Renci.SshNet; using   Renci.SshNet.Sftp; using   System.Threading; namespace WindowsFormsApp3 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void  button1_Click( object sender, EventArgs e)         {             MessageBox.Show("D...

Classes in C#

Image
Hi Everyone, Today, I am posting a short video showing how to create a simple class in C#. As you may know, a class is like a template to create an object with certain characteristics. A class contains public, private, constructors, and methods. In the next and first video about classes, I make a class with public and private variables. for a class, it is better to create all as private that and declare properties as public, doing this we are avoiding to let other parts of the code to modify the variables.