Export (0) Print
Expand All
Expand Minimize

FileName Property

Visual Studio .NET 2003

Returns or sets the project file name.

[Visual Basic .NET]
Public Property FileName() As String
[Visual Basic 6]
Property Get FileName() As String
Property Let FileName( _
   ByVal NewFileName As String _
) 
[C++]
HRESULT __stdcall get_FileName(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_FileName(
   /* [in] */ BSTR NewFileName
);
[C#]
string FileName {get; set;}
[JScript .NET]
public function get FileName() : String
public function set FileName(
   NewFileName: String
)

Parameters

NewFileName
The new name for the project file, including the file name extension.

Remarks

If a new name is given to the project, a new project file is created and saved. The AssemblyName and OutputFileName properties do not change when the project file name is changed.

The file extension for Visual Basic projects is "vbproj". The extension for Visual C# projects is "csproj". If the NewFileName parameter does not end with the proper extension, it is added to NewFileName before creating the new file.

Example

See the topic Properties Property (Visual Basic and Visual C# Project Object), WebAccessMethod Property, and ProjectType Property.

See Also

General, Common Properties, <Projectname> Property Pages Dialog Box (C#) | General, Common Properties, <Projectname> Property Pages Dialog Box (Visual Basic)

Applies To: Properties Property (General Extensibility) | Properties Property (Visual Basic and Visual C# Project Object)

Show:
© 2015 Microsoft