skea Posted December 12, 2009 Posted December 12, 2009 (edited) [PLAIN][Resolved]Binary Reader. Resource Object.[/PLAIN] I have an embedded .config resource file "IncidentTrackerDockTemplate.config" in my Resource File called "GlobalResource". I would like to read this file using BinaryReader. i get an exception in my code. Value cannot be null. Parameter name: input below is the code. Any one knows where the problem is? [color=Blue]private[/color] System.Resources.[color=ff2b91af]ResourceManager[/color] resources = [color=Blue]new[/color] System.Resources.[color=ff2b91af]ResourceManager[/color]([color=red]"Incidents_Tracker.UI.GlobalResource"[/color], System.Reflection.[color=ff2b91af]Assembly[/color].GetExecutingAssembly()); [color=ff2b91af]BinaryReader[/color] sr = [color=Blue]new[/color] [color=ff2b91af]BinaryReader[/color]([color=ff2b91af]Assembly[/color].GetExecutingAssembly().GetManifestResourceStream(resources.GetObject([color=red]"IncidentTrackerDockTemplate"[/color]).ToString()), System.Text.[color=ff2b91af]Encoding[/color].GetEncoding([color=ffa31515]"UTF-16"[/color]));[color=Green] [/color] Edited December 12, 2009 by skea Quote
skea Posted December 12, 2009 Author Posted December 12, 2009 (edited) [PLAIN][Resolved] Binary Reader. Resource Object.[/PLAIN] Resolved it. Edited December 12, 2009 by skea Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.