Kentico 11 API Reference
Kentico 11 API Reference
Namespaces
CMS.DeviceProfiles
CurrentDeviceExtensions Class
CurrentDeviceExtensions Methods
IsMobile Method
CurrentDeviceExtensions
IsMobile Method
Extends
CurrentDevice
for detection if
device
is mobile.
Namespace:
CMS.DeviceProfiles
Assembly:
CMS.DeviceProfiles (in CMS.DeviceProfiles.dll) Version: 11.0.0
Syntax
C#
Copy
public
static
bool
IsMobile
(
this
CurrentDevice
device
)
Parameters
device
Type:
CMS.DeviceProfiles
CurrentDevice
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
Exception
Condition
ArgumentNullException
device
or is null.
Remarks
Uses the default .NET Framework mobile device recognition.
See Also
Reference
CurrentDeviceExtensions Class
CMS.DeviceProfiles Namespace
Copyright (c) 2017 Kentico Software
Send comments on this topic to
support@kentico.com