共用方式為


SmsDevice.CalculateLength(SmsTextMessage) 方法

定義

估計所指定文字訊息的傳輸訊息長度。 此估計值對於想要指出網路上將傳送多少訊息的用戶端很有用,以攜帶完整訊息的文字。

public:
 virtual SmsEncodedLength CalculateLength(SmsTextMessage ^ message) = CalculateLength;
/// [Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
SmsEncodedLength CalculateLength(SmsTextMessage const& message);
/// [Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
SmsEncodedLength CalculateLength(SmsTextMessage const& message);
[Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
public SmsEncodedLength CalculateLength(SmsTextMessage message);
[Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public SmsEncodedLength CalculateLength(SmsTextMessage message);
function calculateLength(message)
Public Function CalculateLength (message As SmsTextMessage) As SmsEncodedLength

參數

message
SmsTextMessage

要測量之 SMS 簡訊的參考。

傳回

SmsEncodedLength 結構的參考,該結構會填入長度資訊。

實作

屬性

Windows 需求

應用程式功能
cellularMessaging sms

適用於