Click here to Skip to main content
15,887,334 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reg. Regular Expression Pin
Agent__00710-Dec-14 21:07
professionalAgent__00710-Dec-14 21:07 
AnswerRe: Reg. Regular Expression Pin
Matt T Heffron12-Dec-14 7:04
professionalMatt T Heffron12-Dec-14 7:04 
GeneralRe: Reg. Regular Expression Pin
jschell12-Dec-14 12:08
jschell12-Dec-14 12:08 
QuestionRevit macro with if/else command Pin
William Wydock9-Dec-14 11:15
William Wydock9-Dec-14 11:15 
AnswerRe: Revit macro with if/else command Pin
BillWoodruff9-Dec-14 14:21
professionalBillWoodruff9-Dec-14 14:21 
AnswerRe: Revit macro with if/else command Pin
Eddy Vluggen10-Dec-14 0:32
professionalEddy Vluggen10-Dec-14 0:32 
Questionplease help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gajanangan9-Dec-14 7:22
gajanangan9-Dec-14 7:22 
SuggestionRe: please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gaurigan9-Dec-14 16:17
gaurigan9-Dec-14 16:17 
namespace CollectionsTest
{
using System;
using System.Collections.Generic;

using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Runtime;

using System.Collections.Concurrent;
using System.Threading.Tasks;
using System.Threading;

class Program
{


static void Main(string[] args)
{
basictestc();
}
// loop to print odd and even key values in debug window
public static void printvalue(int k)
{
var cc = (Cnestedict5[k]).Values.ToArray();
var ck = (Cnestedict5[k]).Keys.ToArray();
for (int i = 0; i < cc.Count(); i++)
{
DateTime dt = ck[i];
String dcandle = cc[i];
Debug.WriteLine(string.Format("pids1:{0},Count{1}, datetime:{2}: ticks:{3}", k * 100 + i, cc.Count(), ck[i], cc[i]));

}

}

public static ConcurrentDictionary<int, ConcurrentDictionary<DateTime, String>> Cnestedict5 = new ConcurrentDictionary<int, ConcurrentDictionary<DateTime, string>>();
public static void basictestc()
{
int mk = 7001, nk = 7000;
DateTime ddn = DateTime.Now;
ConcurrentDictionary<DateTime, string> cd = new ConcurrentDictionary<DateTime, string>();
Cnestedict5.TryAdd(mk, cd); Cnestedict5.TryAdd(nk, cd);

for (int i = 0; i < 12; i++)
{
ddn = ddn.AddMinutes(1);

if (ddn.Minute % 2 != 0)
{
Cnestedict5.GetOrAdd(mk, n => new ConcurrentDictionary<DateTime, string>()).TryAdd(ddn, "odd");
printvalue(mk);
}

else if (ddn.Minute % 2 == 0)
{
Cnestedict5.GetOrAdd(nk, n => new ConcurrentDictionary<DateTime, string>()).TryAdd(ddn, "even");
printvalue(nk);
}
}
}
}
}
QuestionRe: please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
Richard MacCutchan9-Dec-14 22:15
mveRichard MacCutchan9-Dec-14 22:15 
AnswerSolved :please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gaurigan10-Dec-14 13:56
gaurigan10-Dec-14 13:56 
Questionproblem finding control and getting its values for dynamically created textboxes Pin
Dhyanga9-Dec-14 5:34
Dhyanga9-Dec-14 5:34 
SuggestionRe: problem finding control and getting its values for dynamically created textboxes Pin
Richard Deeming9-Dec-14 6:34
mveRichard Deeming9-Dec-14 6:34 
Questiontrouble to allocate/read buffer modified by native function Pin
Member 111038219-Dec-14 0:20
Member 111038219-Dec-14 0:20 
AnswerRe: trouble to allocate/read buffer modified by native function Pin
Richard MacCutchan9-Dec-14 6:08
mveRichard MacCutchan9-Dec-14 6:08 
QuestionTime out Expires while generating report. Pin
Pushpak Shah8-Dec-14 20:44
professionalPushpak Shah8-Dec-14 20:44 
QuestionRemote powershell / WinRM to Server 2012 Pin
JD868-Dec-14 18:49
JD868-Dec-14 18:49 
SuggestionRe: Remote powershell / WinRM to Server 2012 Pin
Richard MacCutchan8-Dec-14 22:07
mveRichard MacCutchan8-Dec-14 22:07 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
JD869-Dec-14 3:19
JD869-Dec-14 3:19 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
Richard MacCutchan9-Dec-14 5:49
mveRichard MacCutchan9-Dec-14 5:49 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
JD8610-Dec-14 5:09
JD8610-Dec-14 5:09 
QuestionCreate a nested TreeView for Windows 8.1 app Pin
Bhola S. Parit8-Dec-14 18:20
Bhola S. Parit8-Dec-14 18:20 
AnswerRe: Create a nested TreeView for Windows 8.1 app Pin
BillWoodruff8-Dec-14 21:26
professionalBillWoodruff8-Dec-14 21:26 
Questionrtl gridview Pin
alireza.zahani8-Dec-14 3:36
alireza.zahani8-Dec-14 3:36 
AnswerRe: rtl gridview Pin
alireza.zahani8-Dec-14 3:46
alireza.zahani8-Dec-14 3:46 
GeneralRe: rtl gridview Pin
Blue_Boy8-Dec-14 5:26
Blue_Boy8-Dec-14 5:26 

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.