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

C#

 
QuestionSHDocVw.dll access denied system.dynamic.dll Pin
Digriz773-Feb-15 12:51
Digriz773-Feb-15 12:51 
AnswerRe: SHDocVw.dll access denied system.dynamic.dll Pin
Bernhard Hiller5-Feb-15 7:54
Bernhard Hiller5-Feb-15 7:54 
GeneralRe: SHDocVw.dll access denied system.dynamic.dll Pin
Digriz775-Feb-15 14:26
Digriz775-Feb-15 14:26 
GeneralRe: SHDocVw.dll access denied system.dynamic.dll Pin
DelphiCoder5-Feb-15 20:44
DelphiCoder5-Feb-15 20:44 
QuestionHow to add foregin key in code firest Pin
Member 114240953-Feb-15 5:28
Member 114240953-Feb-15 5:28 
AnswerRe: How to add foregin key in code firest Pin
Simon_Whale3-Feb-15 5:46
Simon_Whale3-Feb-15 5:46 
GeneralRe: How to add foregin key in code firest Pin
Member 114240953-Feb-15 5:56
Member 114240953-Feb-15 5:56 
QuestionUsing strings from external .txt file Pin
Tetra10443-Feb-15 3:47
Tetra10443-Feb-15 3:47 
Hi all

I am completely new to programming and C# but have been given a project which seems fairly difficult to me.

The project involves recreating the WW2 Enigma Machine cipher in a C# Windows Form. The machine has 3 rotors which contain all letters of the alphabet in a set order. These rotors turn one place on each use of the machine.

To allow for the rotors to turn, I have created a .txt file for each which has the 26 possible rotor settings. I will include a small example below...

VB
EKMFLGDQVZNTOWYHXUSPAIBRCJ
KMFLGDQVZNTOWYHXUSPAIBRCJE
MFLGDQVZNTOWYHXUSPAIBRCJEK
FLGDQVZNTOWYHXUSPAIBRCJEKM
LGDQVZNTOWYHXUSPAIBRCJEKMF



The problem I am having is that I am unsure on how to read this file, only take the required line, and then be able to look at each character in order to carry out the cipher. i THINK I need to read the whole text into a string, grab another string from that using the first 26 characters (or until the new line), then separate the characters from there. Maybe....

If anyone could point me in the right direction I would hugely appreciate it. It is also very possible that I am looking at the situation in the wrong way, so any help would be great.

Thanks
Tetra1044
AnswerRe: Using strings from external .txt file Pin
OriginalGriff3-Feb-15 4:04
mveOriginalGriff3-Feb-15 4:04 
GeneralRe: Using strings from external .txt file Pin
Tetra10443-Feb-15 4:20
Tetra10443-Feb-15 4:20 
GeneralRe: Using strings from external .txt file Pin
OriginalGriff3-Feb-15 4:30
mveOriginalGriff3-Feb-15 4:30 
GeneralRe: Using strings from external .txt file Pin
Tetra10443-Feb-15 4:41
Tetra10443-Feb-15 4:41 
AnswerRe: Using strings from external .txt file Pin
BillWoodruff4-Feb-15 6:21
professionalBillWoodruff4-Feb-15 6:21 
GeneralRe: Using strings from external .txt file Pin
Tetra10445-Feb-15 3:06
Tetra10445-Feb-15 3:06 
QuestionHow to share a server connection between different powershell runspaces in c# on a web application Pin
tasoss2-Feb-15 21:37
tasoss2-Feb-15 21:37 
QuestionRe: How to share a server connection between different powershell runspaces in c# on a web application Pin
Richard MacCutchan3-Feb-15 0:38
mveRichard MacCutchan3-Feb-15 0:38 
AnswerRe: How to share a server connection between different powershell runspaces in c# on a web application Pin
tasoss3-Feb-15 0:59
tasoss3-Feb-15 0:59 
SuggestionReceiving Windows Message in class library asynchronously in C# Pin
Ram Kumar2-Feb-15 18:07
Ram Kumar2-Feb-15 18:07 
GeneralRe: Receiving Windows Message in class library asynchronously in C# Pin
Richard Deeming4-Feb-15 1:53
mveRichard Deeming4-Feb-15 1:53 
QuestionStruct and Enum Pin
Member 111616252-Feb-15 18:05
Member 111616252-Feb-15 18:05 
AnswerRe: Struct and Enum Pin
OriginalGriff2-Feb-15 21:13
mveOriginalGriff2-Feb-15 21:13 
AnswerRe: Struct and Enum Pin
BillWoodruff3-Feb-15 21:01
professionalBillWoodruff3-Feb-15 21:01 
AnswerRe: Struct and Enum Pin
V.3-Feb-15 22:02
professionalV.3-Feb-15 22:02 
Questionhow do I change a regex Pin
Member 113543862-Feb-15 11:55
Member 113543862-Feb-15 11:55 
AnswerRe: how do I change a regex Pin
Tomáš Podešva2-Feb-15 17:14
professionalTomáš Podešva2-Feb-15 17:14 

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.