Resource Management (C# vs Java)

In C# using Visual Studio, managing resources is simplified.

Java

Java applications are typically bundled in a JAR file, together with an application's various resources, such as class files, sound files, and image files. You’ll most likely use JBuilder or Eclipse which manage JAR files much as Visual Studio manages solutions and projects.

C#

In C# projects, you can just open your resources from Visual Studio's Solution Explorer.

You can also use the Image Editor and the Binary Editor to work with resource files in managed projects.

For more information about how to add resources to managed projects, see:

You can read these resources in your application as external content or embedded resources. For example, the following lines of code use the classes in the System.Reflection namespace and classes such as Assembly to read an embedded resource file from your assembly. In this case, the file is assemblyname.file.ext.

static void Main()
{
    System.Reflection.Assembly asm = 
        System.Reflection.Assembly.GetExecutingAssembly();

    System.Drawing.Bitmap tiles = new System.Drawing.Bitmap
        (asm.GetManifestResourceStream("assemblyname.file.ext"));
}

See Also

Concepts

C# Programming Guide

Adding and Editing Resources (Visual C#)

Other Resources

C# for Java Developers