Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

read embedded resource c# xml

public string GetResourceTextFile(string filename)
{
    string result = string.Empty;

    using (Stream stream = this.GetType().Assembly.
               GetManifestResourceStream("assembly.folder."+filename))
    {
        using (StreamReader sr = new StreamReader(stream))
        {
            result = sr.ReadToEnd();
        }
    }
    return result;
}
Comment

read embedded resource c# xml

public string GetResourceTextFile(string filename)
{
    string result = string.Empty;

    using (Stream stream = this.GetType().Assembly.
               GetManifestResourceStream("assembly.folder."+filename))
    {
        using (StreamReader sr = new StreamReader(stream))
        {
            result = sr.ReadToEnd();
        }
    }
    return result;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: const class in c sharp 
Csharp :: create line in unity 
Csharp :: .net c# print object 
Csharp :: get any random item in array c# 
Csharp :: converting bitmap to byte array c# 
Csharp :: unity random number 
Csharp :: capitalize c# 
Csharp :: unity icons 
Csharp :: exit button unity code 
Csharp :: get type of variable c# 
Csharp :: unity instantiate prefab rotation 
Csharp :: c# underscore variable 
Csharp :: c# reflection resize array 
Csharp :: c# sum of list 
Csharp :: c# loop through list of objects 
Csharp :: c# named parameters 
Csharp :: doing void when gameobject setactive unity 
Csharp :: hello world in unity c# 
Csharp :: how to make text show a variable in unity 
Csharp :: C# function return datareader 
Csharp :: c# mongodb update multiple fields 
Csharp :: play sound in unity c# 
Csharp :: string to datetime c# 
Csharp :: create new .net project 
Csharp :: read file using c# 
Csharp :: unity get game version 
Csharp :: change working directory shell 
Csharp :: sqldatareader in c# 
Csharp :: C# redirecttoaction with area 
Csharp :: checking if a list contains a value unity 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =