Click here to Skip to main content
14,660,320 members
Home » Discussions » C#
   

C#

 
GeneralRe: Rename files in WinScp Directory using C# Pin
Sriram Valluri27-Apr-20 21:21
MemberSriram Valluri27-Apr-20 21:21 
QuestionMulticombobox in datagridview c# Pin
Member 1347974626-Apr-20 16:12
MemberMember 1347974626-Apr-20 16:12 
AnswerRe: Multicombobox in datagridview c# Pin
OriginalGriff26-Apr-20 19:25
mveOriginalGriff26-Apr-20 19:25 
QuestionAccess Rights Management Pin
Member 1481258225-Apr-20 13:13
MemberMember 1481258225-Apr-20 13:13 
AnswerRe: Access Rights Management Pin
OriginalGriff25-Apr-20 20:09
mveOriginalGriff25-Apr-20 20:09 
AnswerRe: Access Rights Management Pin
Gerry Schmitz26-Apr-20 6:54
mveGerry Schmitz26-Apr-20 6:54 
AnswerRe: Access Rights Management Pin
Mycroft Holmes26-Apr-20 12:21
professionalMycroft Holmes26-Apr-20 12:21 
QuestionIssue while solving 100 Doors Kata Problem Pin
User-862169524-Apr-20 21:51
MemberUser-862169524-Apr-20 21:51 
Hi,

I'm trying to solve 100 doors Kata from provided link "http://www.tddbuddy.com/katas/100%20Doors.pdf[^]"

I've solved Open and Closed door status but stuck with Bonus part where I have to show Holding state as well. Can someone please help me to solve that. Below is the code for Open and Close door.
List<bool> listDoorStatus= new List<bool>();
for (int i = 1; i <= 100; i++)
            {
                for (int j = i; j <= numberOfDoors; j += i)
                {
                    listDoorStatus[j - 1] = !listDoorStatus[j - 1];
                }
            }
            StringBuilder sb = new StringBuilder();
            foreach (var item in listDoorStatus)
            {
                if (item)
                {
                    sb.Append("@");
                }
                else
                {
                    sb.Append("#");
                }
            } return sb.toString()

AnswerRe: Issue while solving 100 Doors Kata Problem Pin
OriginalGriff24-Apr-20 22:06
mveOriginalGriff24-Apr-20 22:06 
GeneralRe: Issue while solving 100 Doors Kata Problem Pin
User-862169524-Apr-20 22:21
MemberUser-862169524-Apr-20 22:21 
GeneralRe: Issue while solving 100 Doors Kata Problem Pin
OriginalGriff24-Apr-20 22:31
mveOriginalGriff24-Apr-20 22:31 
QuestionRe: Issue while solving 100 Doors Kata Problem Pin
Richard MacCutchan24-Apr-20 22:09
mveRichard MacCutchan24-Apr-20 22:09 
AnswerRe: Issue while solving 100 Doors Kata Problem Pin
Gerry Schmitz25-Apr-20 11:52
mveGerry Schmitz25-Apr-20 11:52 
QuestionSQL Connection in Visual Studio Pin
Member 1481258224-Apr-20 12:25
MemberMember 1481258224-Apr-20 12:25 
AnswerRe: SQL Connection in Visual Studio Pin
Eddy Vluggen24-Apr-20 12:40
professionalEddy Vluggen24-Apr-20 12:40 
AnswerRe: SQL Connection in Visual Studio Pin
Matt Slay24-Apr-20 16:28
MemberMatt Slay24-Apr-20 16:28 
AnswerRe: SQL Connection in Visual Studio Pin
OriginalGriff24-Apr-20 20:09
mveOriginalGriff24-Apr-20 20:09 
AnswerRe: SQL Connection in Visual Studio Pin
Gerry Schmitz25-Apr-20 11:46
mveGerry Schmitz25-Apr-20 11:46 
Questioncasting from interface instance back to generic instance ? Pin
BillWoodruff24-Apr-20 1:11
mveBillWoodruff24-Apr-20 1:11 
GeneralRe: casting from interface instance back to generic instance ? Pin
harold aptroot24-Apr-20 1:29
Memberharold aptroot24-Apr-20 1:29 
GeneralRe: casting from interface instance back to generic instance ? Pin
BillWoodruff24-Apr-20 2:41
mveBillWoodruff24-Apr-20 2:41 
GeneralRe: casting from interface instance back to generic instance ? Pin
Richard Deeming24-Apr-20 3:26
mveRichard Deeming24-Apr-20 3:26 
GeneralRe: casting from interface instance back to generic instance ? Pin
BillWoodruff24-Apr-20 4:52
mveBillWoodruff24-Apr-20 4:52 
GeneralRe: casting from interface instance back to generic instance ? Pin
Richard Deeming24-Apr-20 4:59
mveRichard Deeming24-Apr-20 4:59 
AnswerRe: casting from interface instance back to generic instance ? Pin
jschell26-Apr-20 9:59
Memberjschell26-Apr-20 9:59 

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.