Skip to content

Commit e0e60ba

Browse files
committed
Make classes having only static members static
1 parent 6762f1d commit e0e60ba

3 files changed

Lines changed: 3 additions & 17 deletions

File tree

src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,8 @@ protected void ThrowWin32Error()
428428

429429
#region Win32 interop helper
430430

431-
internal class NativeMethods
431+
internal static class NativeMethods
432432
{
433-
/// <summary>
434-
/// Private constructor to prevent instantiation.
435-
/// </summary>
436-
private NativeMethods()
437-
{
438-
}
439-
440433
#region Native DLL locations
441434

442435
private const string SetDynamicTimeZoneApiDllName = "api-ms-win-core-timezone-l1-1-0.dll";

src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/StringUtil.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ namespace System.Management.Automation.SecurityAccountsManager
99
/// <summary>
1010
/// Contains utility functions for formatting localizable strings.
1111
/// </summary>
12-
internal class StringUtil
12+
internal static class StringUtil
1313
{
14-
/// <summary>
15-
/// Private constructor to precent auto-generation of a default constructor with greater accessability.
16-
/// </summary>
17-
private StringUtil()
18-
{
19-
}
20-
2114
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
2215
internal static string Format(string str)
2316
{

src/Microsoft.PowerShell.ScheduledJob/ScheduledJobDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ internal string FQEID
23002300
/// <summary>
23012301
/// Simple string formatting helper.
23022302
/// </summary>
2303-
internal class StringUtil
2303+
internal static class StringUtil
23042304
{
23052305
internal static string Format(string formatSpec, object o)
23062306
{

0 commit comments

Comments
 (0)