MGZ NetArt

Software Development and Support

Home
Design Patterns
C# Tips
AsyncCallback
Asynchronous Form.ShowDia
BackgroundWorker
Connection String
CopyTo() vs Clone()
Convert Color To String
Dispose vs Finalize
Debug mode
Delete Duplicate in SQL
Drag&Drop for TreeView
Edit Full Path Property
Hiding And Overriding
Polimorphism
How to use Resources
Run Time DLL
Simple Threading
Singleton Connection
Save Win Form as JPG File
Save Object in Registry
Soap Serialization
Sort and CompareTo
Working With List<>
Examples & Videos
MRDS Examples
Resume
Contact Us
How to use Resources
If you have to build string base on txt file in your application you can utilize Resources for that matter. And this resources could belong to different Class Library. Code is much more compact then when you open a txt file directly.


private string ReturnCodeForCustomObject(CustomObject obj)

{           

  string sBuffer = DLLName.Properties.Resources.FileName.ToString();

  sBuffer = sBuffer.Replace("{0}", obj.Text);

  return sBuffer;

}