You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Initializes a new instance of the <see cref="ShellLinkFile"/> class.
30
29
/// Creates a new, empty shell link.
31
30
/// </summary>
32
-
publicShellLinkFile()
33
-
{
34
-
_shellLink=(IShellLinkW)newShellLink();
35
-
}
36
-
37
-
/// <summary>
38
-
/// Initializes a new instance of the <see cref="ShellLinkFile"/> class and loads an existing shortcut file.
39
-
/// </summary>
40
-
/// <param name="filePath">The path to the shortcut file to load.</param>
41
-
/// <exception cref="ArgumentNullException">Thrown when <paramref name="filePath"/> is null.</exception>
42
-
/// <exception cref="ArgumentException">Thrown when <paramref name="filePath"/> is empty or whitespace.</exception>
43
-
/// <exception cref="FileNotFoundException">Thrown when the specified file does not exist.</exception>
44
-
publicShellLinkFile(stringfilePath):this()
31
+
/// <returns>A new <see cref="ShellLinkFile"/> instance.</returns>
32
+
publicstaticShellLinkFileNew()
45
33
{
46
-
Load(filePath);
34
+
returnnew();
47
35
}
48
36
49
37
/// <summary>
50
-
/// Initializes a new instance of the <see cref="ShellLinkFile"/> class with the specified target path.
38
+
/// Creates a new shell link with the specified target path.
51
39
/// </summary>
52
40
/// <param name="targetPath">The target path for the shortcut.</param>
53
-
/// <param name="createNew">Must be <see langword="true"/> to use this constructor. This parameter disambiguates from the file loading constructor.</param>
54
-
/// <exception cref="ArgumentException">Thrown when <paramref name="createNew"/> is false.</exception>
0 commit comments