This is a migrated thread and some comments may be shown as answers.

UploadedFiles.Item(0) to C#

0 Answers 61 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Moon
Top achievements
Rank 2
Moon asked on 01 Feb 2009, 11:14 PM
In my VB code I have:

 

        Public Function GetExtension(ByVal radFileUpload As RadUpload) As String 
 
            Dim fileExtension As String = String.Empty  
            If radFileUpload.UploadedFiles.Count > 0 Then 
                Dim validFile As UploadedFile = radFileUpload.UploadedFiles.Item(0)  
                fileExtension = validFile.GetExtension  
            End If 
            Return fileExtension  
 
        End Function 
 

But when i convert this to C#, I get an error on the Item(0):

 UploadedFile validFile = radFileUpload.UploadedFiles.Item[0];

It says Telerik doesn't contain a definition for Item.

How do I write this in C#?

thanks.

I have:
using Telerik.Web.UI;

thanks.

No answers yet. Maybe you can help?

Tags
Upload (Obsolete)
Asked by
Moon
Top achievements
Rank 2
Share this question
or