Ok this is what i have for Code than i'll explain the problem i'm having:
The issue i'm having is with : if (newsock(i).Connected == its the newsock that is giving me the problem,any ideas on the correction of this section of code will be appreciated...Thxs in AdvanceVB Code:
using System; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Runtime; using System.Net; using Microsoft.VisualBasic; using System.Net.Sockets; using System.Collections; namespace TestClient { public partial class TestClient : Form { ColumnHeader Header = new ColumnHeader(); ListViewItem Item = new ListViewItem(); ArrayList socketList = new ArrayList(5); Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); public YahKiller() { InitializeComponent(); } private void Timer1_Tick(System.Object eventSender, System.EventArgs eventArgs) { short i = 0; for (i = 0; i <= System.Convert.ToInt16(double.Parse(ServerList.Text) - 1); i++) { PacketsLabel.Text = System.Convert.ToString(double.Parse(PacketsLabel.Text) + 1); if (newsock(i).Connected == newsock_ConnectEvent(eventSender, eventArgs)) /* this is the line of code i'm having some trouble with*/ { string transTemp9 = LoginMod.ClientID[i]; string transTemp10 = (backup.Text); newsock.SendFile(testfile.PM(ref transTemp9, ref transTemp10)); } } i = System.Convert.ToInt16(i + 1); }![]()
Here is the Error:
Error 26 'TestClient.TestClient.newsock' is a 'field' but is used like a 'method'





Reply With Quote