[Resolved]Binary Reader. Resource Object.
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?
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?
Code:
[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]
Last edited: