View Single Post
  #1 (permalink)  
Old January 23rd, 2007, 04:17 AM
bhavna bhavna is offline
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default scope of variables in VB.NET

There is a filestream and a streamwriter in Sub Main()
Dim fs As New FileStream("c:\OL_Table.htm", FileMode.Create, FileAccess.Write)
 Dim s As New StreamWriter(fs)

//code goes here

s.Close()
        fs = New FileStream("c:\OL_Table.htm", FileMode.Open, FileAccess.Read)
        Dim d As New StreamReader(fs)
        d.BaseStream.Seek(0, SeekOrigin.Begin)

and there is a class having functions

Public Class MailItemClass
    Function1: Public Function DisplayMails(ByVal PFolder As Object, ByVal SFolder As Object) As String
    Function2: Public Function DisplayBody(ByVal PFolder As Object, ByVal SFolder As Object, ByVal Msg As Object) As String

which display mailitems and the message body respectively.
I want to display these mailitems and the message body in the HTML page having filestream and streamwriter i.e. "s"
but the filestream and a streamwriter are not accessible in the class functions.
how can i display the mailitems and the message body in the same HTML page in the Sub Main()