public InputStream openResource(String resource) throws IOException {final InputStream stream = (clazz != null) ?clazz.getResourceAsStream(resource) :loader.getResourceAsStream(resource);if (stream == null)throw new IOException("Resource not found: " + resource);return stream;}

public Stream OpenResource(string resource){Stream stream = this.clazz.GetTypeInfo().Assembly.FindAndGetManifestResourceStream(clazz, resource);if (stream == null){throw new IOException("Resource not found: " + resource);}return stream;}
