2023.01.25
- se crea un dll
- se crea un archivo leeme.xml
- en propiedades se define como Embedded
- dentro del archivo leeme.xml estructuras la informacion
- ingresas los datos
El archivo externo en el explorer solution debe estar Embedded en las propiedades y asi podra leerse.
private void button5_Click(object sender, EventArgs e)
{
Assembly assembly = Assembly.LoadFrom(@"C:\NeoMed\app.prince.com\Prince.Example.ReadContent.dll");
var resourceName2 = "Prince.Example.ReadContent.leeme.xml";
string resource = null;
using (Stream stream = assembly.GetManifestResourceStream(resourceName2))
{
using (StreamReader reader = new StreamReader(stream))
{
resource = reader.ReadToEnd();
}
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter