What I'm doing wrong here?



I don't get what I'm doing wrong here:



public SectionBase DeserializeModule(Type moduleType ,string path)
{
Type actualType = moduleType;
SectionBase moduleBase;
var xmlDeserializer = new XmlSerializer(moduleType);
using (var streamReader = new StreamReader(path))
{
moduleBase = (actualType) xmlDeserializer.Deserialize(streamReader);
}
return moduleBase;
}


I receive an "Cannot solve symbol "actualType" ". SectionBase is the base class from which I inherit the other classes(modules). Can anyone explain to me? Thanks!


No comments:

Post a Comment