pls help me it urgent
i m facing a problem with my vb.net code
this is the code equivalent in c#
this is the interface...... ..
............... ............... ............... ............... ............... ............... ............... ......
namespace x
{.
public interface ISection
{
string UserControl
{
get;
}
string SectionId
{
get;
}
bool Delete();
void SaveData();
List<SearchResu lt> Search(string searchString, WebPage page);
}
............... ............... ............... ............... ............... ............... ............... .......
and in a another class file i use this interface isection like this
namespace x
{
public class Sidebar
............... ............... .....
...............
public static bool GetSectionRss(X mlWriter rss, ISection section, string pageId, string TitlePrefix)
{
if (section != null)
{
ChannelData SectionChannel = ((ISidebarObjec t)section).GetS idebarRss(pageI d);
string TypeName = section.GetType ().ToString();
............... ............... ............... ............... ...
............... ............... ..............
}}}
it is working in C#
but when i chane the code into vb.net
i m getting a error message in
dim TypeName as string =section.[gettype]().Tostring()
i tried to use dim TypeName as string =section.gettyp e()
but i cannot type like .......
later i know that type of a interface cannot getthrough GetType()
but i want to get the type of that interface...... ..........
pls help me ,tell me another method for it.
thanks in advance........ .............
i m facing a problem with my vb.net code
this is the code equivalent in c#
this is the interface...... ..
............... ............... ............... ............... ............... ............... ............... ......
namespace x
{.
public interface ISection
{
string UserControl
{
get;
}
string SectionId
{
get;
}
bool Delete();
void SaveData();
List<SearchResu lt> Search(string searchString, WebPage page);
}
............... ............... ............... ............... ............... ............... ............... .......
and in a another class file i use this interface isection like this
namespace x
{
public class Sidebar
............... ............... .....
...............
public static bool GetSectionRss(X mlWriter rss, ISection section, string pageId, string TitlePrefix)
{
if (section != null)
{
ChannelData SectionChannel = ((ISidebarObjec t)section).GetS idebarRss(pageI d);
string TypeName = section.GetType ().ToString();
............... ............... ............... ............... ...
............... ............... ..............
}}}
it is working in C#
but when i chane the code into vb.net
i m getting a error message in
dim TypeName as string =section.[gettype]().Tostring()
i tried to use dim TypeName as string =section.gettyp e()
but i cannot type like .......
later i know that type of a interface cannot getthrough GetType()
but i want to get the type of that interface...... ..........
pls help me ,tell me another method for it.
thanks in advance........ .............
Comment