Click or drag to resize
CurrentDeviceExtensionsIsMobile Method
Extends CurrentDevice for detection if device is mobile.

Namespace: CMS.DeviceProfiles
Assembly: CMS.DeviceProfiles (in CMS.DeviceProfiles.dll) Version: 12.0.0
Syntax
C#
public static bool IsMobile(
	this CurrentDevice device
)

Parameters

device
Type: CMS.DeviceProfilesCurrentDevice
Device to extend.

Return Value

Type: Boolean
Returns true when device is a mobile device.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CurrentDevice. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptiondevice or is null.
Remarks
Uses the default .NET Framework mobile device recognition.
See Also