MonobjcMonobjc Documented Class Library
InitWithContentsOfFile Method (filename)
NamespacesMonobjc.AppKitNSImageInitWithContentsOfFile(NSString)

Initializes and returns an NSImage instance with the contents of the specified file.

Original signature is '- (id)initWithContentsOfFile:(NSString *)filename'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual Id InitWithContentsOfFile(
	NSString filename
)
Public Overridable Function InitWithContentsOfFile ( _
	filename As NSString _
) As Id
public:
virtual Id^ InitWithContentsOfFile(
	NSString^ filename
)
Parameters
filename (NSString)
A full or relative path name specifying the file with the desired image data. Relative paths must be relative to the current working directory.
Return Value
An initialized NSImage instance, or nil if the method cannot create an image representation from the contents of the specified file.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)