private const object Defaultcolumns = null; Resharper thinks this is invald

In the Code Below Resharper 218 marks DefaultColumns as invalid const although it compiles fine in Visual Studio 2003

using System;
using System.Runtime.Serialization;

namespace PROCOS.Components.Cockpit.Shared
{
/// /// Summary description for CBand. /// ]]>

public class CBand2
{
private const object Defaultcolumns = null;
private const string Serialcolumns = "1";

private object columns;

#region Serialization

public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue(Serialcolumns, this.columns,typeof(CColumns));
}

public CBand2(SerializationInfo info, StreamingContext context)
{
this.columns = Defaultcolumns;
try
{
this.columns = (string)info.GetValue(Serialcolumns, typeof (CColumns));
}
catch(Exception)
{

}
}

#endregion
}
}

1 comment
Comment actions Permalink

Thank you. Will be fixed shortly

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Thomas Stocker" <no_mail@jetbrains.com> wrote in message
news:12707706.1140109805429.JavaMail.javamailuser@localhost...

In the Code Below Resharper 218 marks DefaultColumns as invalid const
although it compiles fine in Visual Studio 2003

>

using System;
using System.Runtime.Serialization;

>

namespace PROCOS.Components.Cockpit.Shared
{
/// <summary>
/// Summary description for CBand.
/// </summary>

public class CBand2
{
private const object Defaultcolumns = null;
private const string Serialcolumns = "1";

>

private object columns;

>

#region Serialization

>

public void GetObjectData(SerializationInfo info, StreamingContext
context)
{
info.AddValue(Serialcolumns, this.columns,typeof(CColumns));
}

>

public CBand2(SerializationInfo info, StreamingContext context)
{
this.columns = Defaultcolumns;
try
{
this.columns = (string)info.GetValue(Serialcolumns, typeof (CColumns));
}
catch(Exception)
{

>

}
}

>

#endregion
}
}



0

Please sign in to leave a comment.