VB.NET to C#
Posted on 2005-03-28
I have a sample code in VB.NET which I am converting to C#. I am using Softartisans FileUp and XFile to upload file to webserver.
Here is the part of VB.NET code
1) Dim oFileUp As New FileUp(Me.Context)
2) Dim iterator As SaUploadDictionaryEnum
3) iterator = CType(oFileUp.Form.GetEnumerator(), SaUploadDictionaryEnum)
4) If TypeOf oFileUp.Form(iterator.Current) Is SaFile Then
5) End If
I am converting the above code to C#......I am stuck at line 4(If TypeOf oFileUp.Form(iterator.Current) Is SaFile Then). I don't know how to convert line 4 in C#.....
I converted first 3 lines as follows and it worked, but I am stuck at line 4.
FileUp oFileUp = new FileUp(Context);
iterator = oFileUp.Form.GetEnumerator() as SaUploadDictionaryEnum;
So what I need is just equivalent of (If TypeOf oFileUp.Form(iterator.Current) Is SaFile Then) in C#.
Thanks in advance