Click here to Skip to main content
15,886,049 members
Home / Discussions / C#
   

C#

 
QuestionWinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
Marnus Steyn11-Jun-14 4:14
Marnus Steyn11-Jun-14 4:14 
AnswerRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
PIEBALDconsult11-Jun-14 4:54
mvePIEBALDconsult11-Jun-14 4:54 
GeneralRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
Marnus Steyn11-Jun-14 5:03
Marnus Steyn11-Jun-14 5:03 
GeneralRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
PIEBALDconsult11-Jun-14 5:29
mvePIEBALDconsult11-Jun-14 5:29 
GeneralRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
Marnus Steyn11-Jun-14 5:38
Marnus Steyn11-Jun-14 5:38 
GeneralRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
Bernhard Hiller11-Jun-14 20:43
Bernhard Hiller11-Jun-14 20:43 
GeneralRe: WinForm DataGridView - Unable to convert MySql DateTime To System.DateTime Pin
PIEBALDconsult12-Jun-14 2:39
mvePIEBALDconsult12-Jun-14 2:39 
QuestionGetNetworkUsageAsync() not working in Windows Store App on Windows 8.1 Pin
Sharath C V11-Jun-14 1:58
professionalSharath C V11-Jun-14 1:58 
I am trying to get bytes sent and received in a Windows Store App but I am always getting bytes sent/received as zero. Code snippet is shown below. Any help/hint is highly appreciated, thank you Smile | :)

ConnectionProfile connectionProfile = NetworkInformation.GetInternetConnectionProfile();
if (connectionProfile.NetworkAdapter.IanaInterfaceType == (int)EnumMediaType.WiFi)
{
    NetworkUsageStates nus = new NetworkUsageStates();
    nus.Roaming = TriStates.No;
    nus.Shared = TriStates.Yes;

    TimeSpan TimeDiff = new TimeSpan(1, 0, 0);

    IReadOnlyList<NetworkUsage> listNetworkUsage = await connectionProfile.GetNetworkUsageAsync(startTime.Subtract(TimeDiff), DateTimeOffset.Now, DataUsageGranularity.Total, nus);

    for (int i = 0; i < listNetworkUsage.Count; i++)
    {
        textBoxMediaType.Text = string.Format("Sent: {0}, Received: {1}, Duration: {2}", listNetworkUsage[i].BytesSent, listNetworkUsage[i].BytesReceived, listNetworkUsage[i].ConnectionDuration);

    }



Note: I am using IE in the background to download some pages to ensure that bytes are sent/received.

modified 11-Jun-14 9:38am.

AnswerRe: GetNetworkUsageAsync() not working in WindowsRT Pin
Pete O'Hanlon11-Jun-14 3:09
mvePete O'Hanlon11-Jun-14 3:09 
AnswerRe: GetNetworkUsageAsync() not working in WindowsRT Pin
Sharath C V11-Jun-14 3:34
professionalSharath C V11-Jun-14 3:34 
AnswerRe: GetNetworkUsageAsync() not working in WindowsRT Pin
Dave Kreskowiak11-Jun-14 3:12
mveDave Kreskowiak11-Jun-14 3:12 
GeneralRe: GetNetworkUsageAsync() not working in WindowsRT Pin
Sharath C V11-Jun-14 3:38
professionalSharath C V11-Jun-14 3:38 
AnswerRe: GetNetworkUsageAsync() not working in WindowsRT Pin
Sharath C V11-Jun-14 3:30
professionalSharath C V11-Jun-14 3:30 
QuestionWhy have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Member 245846710-Jun-14 17:13
Member 245846710-Jun-14 17:13 
AnswerRe: Why have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Mycroft Holmes10-Jun-14 18:02
professionalMycroft Holmes10-Jun-14 18:02 
AnswerRe: Why have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Swinkaran10-Jun-14 18:37
professionalSwinkaran10-Jun-14 18:37 
AnswerRe: Why have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Kornfeld Eliyahu Peter10-Jun-14 20:17
professionalKornfeld Eliyahu Peter10-Jun-14 20:17 
AnswerRe: Why have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Kumarbs10-Jun-14 20:33
professionalKumarbs10-Jun-14 20:33 
AnswerRe: Why have insert new must command line "SET IDENTITY_INSERT TableName ON" save in SQL Server? Pin
Member 245846711-Jun-14 16:40
Member 245846711-Jun-14 16:40 
QuestionRTF to HTML Converter troubled method Pin
Marnus Steyn10-Jun-14 8:37
Marnus Steyn10-Jun-14 8:37 
AnswerRe: RTF to HTML Converter troubled method Pin
Pete O'Hanlon10-Jun-14 10:11
mvePete O'Hanlon10-Jun-14 10:11 
QuestionBackgroundWorker problem Pin
Member 1053008210-Jun-14 3:19
Member 1053008210-Jun-14 3:19 
AnswerRe: BackgroundWorker problem Pin
Pete O'Hanlon10-Jun-14 3:58
mvePete O'Hanlon10-Jun-14 3:58 
QuestionNot able to use PathGradientBrush in WPF Pin
Member 329381510-Jun-14 1:08
Member 329381510-Jun-14 1:08 
AnswerRe: Not able to use PathGradientBrush in WPF Pin
Pete O'Hanlon10-Jun-14 1:44
mvePete O'Hanlon10-Jun-14 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.