2017-07-01 34 views

回答

2

在一个新的客户端PING一样只需运行一个命令,e.g:

try 
{ 
    using (var redis = new RedisClient(connectionString)) 
    { 
     var connected = redis.Ping(); 
    } 
} 
catch (Exception ex) 
{ 
    //connection failed 
}