Click or drag to resize

HazelcastClientNewHazelcastClient Method (String)

Creates a new hazelcast client using the given configuration xml file

Namespace:  Hazelcast.Client
Assembly:  Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.3
Syntax
public static IHazelcastInstance NewHazelcastClient(
	string configFile
)

Parameters

configFile
Type: SystemString
The configuration file with full or relative path.

Return Value

Type: IHazelcastInstance
IHazelcastInstance.
Examples
//Full path
var hazelcastInstance = Hazelcast.NewHazelcastClient(@"C:\Users\user\Hazelcast.Net\hazelcast-client.xml");
var myMap = hazelcastInstance.GetMap("myMap");

//relative path
var hazelcastInstance = Hazelcast.NewHazelcastClient(@"..\Hazelcast.Net\Resources\hazelcast-client.xml");
var myMap = hazelcastInstance.GetMap("myMap");
See Also