Let me give you a quick example of my problem. I can’t seem to understand the error:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetApp.Manage;
namespace Toaster.Library
{
class NetappConnection
{
private string Hostname {get; set;}
private int ApiMajor {get; set;}
private int ApiMinor {get; set;}
private string Username {get; set;}
private string Password {get; set;}
private NaServer NetappServer {get; set;}
public void NetappConnection(string Hostname, int ApiMajor, int ApiMinor, string Username, string Password)
{
this.Hostname = Hostname;
this.ApiMajor = ApiMajor;
this.ApiMinor = ApiMinor;
this.Username = Username;
this.Password = Password;
this.ConnectToNetapp();
}
private void ConnectToNetapp()
{
NaServer s = new NaServer(this.Hostname, this.ApiMajor, this.ApiMinor);
s.ServerType = NaServer.SERVER_TYPE.FILER;
s.TransportType = NaServer.TRANSPORT_TYPE.HTTP;
s.Port = 80;
s.Style = NaServer.AUTH_STYLE.LOGIN_PASSWORD;
s.SetAdminUser(this.Username, this.Password);
this.NetappServer = s; <<-- Error: Ambiguity between 'Toaster.Library.NetappConnection.NetappServer' and 'Toaster.Library.NetappConnection.NetappServer()'
}
public NaServer NetappServer()
{
return this.NetappServer;
}
}
}
I a C# novice to be honest with you. But I don’t understand why this would not be possible. Is it because of I pass the referance from o to this.Variable?
The Goal of this should be that I’m able to reuse the NaServer Object.
and
have the same name, change one.