March 2004
Intermediate to advanced
560 pages
26h 47m
English
using System;
using System.IO;
using System.Reflection;
namespace Samples
{
public class FileLoadExceptionSample
{
public static void Main()
{
try
{
Assembly a = Assembly.LoadFrom(
"ModuleOnly.netmodule");
Console.WriteLine(a.Location);
}
catch(FileLoadException e)
{
Console.WriteLine("Exception: {0}", e);
}
}
}
}
Exception: System.IO.FileLoadException: The module 'ModuleOnly.netmodule' was expected to contain an assembly manifest. File name: "ModuleOnly.netmodule" at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark) at System.Reflection.Assembly.InternalLoad(AssemblyName ...
Read now
Unlock full access