Click here to Skip to main content
15,901,666 members
Home / Discussions / C#
   

C#

 
GeneralRe: speack to text Pin
Pete O'Hanlon10-Jan-15 2:44
mvePete O'Hanlon10-Jan-15 2:44 
AnswerRe: speack to text Pin
Afzaal Ahmad Zeeshan10-Jan-15 9:26
professionalAfzaal Ahmad Zeeshan10-Jan-15 9:26 
QuestionMultiline textbox scrollbars cannot be moved Pin
robwm19-Jan-15 13:00
robwm19-Jan-15 13:00 
AnswerRe: Multiline textbox scrollbars cannot be moved Pin
Eddy Vluggen9-Jan-15 22:04
professionalEddy Vluggen9-Jan-15 22:04 
GeneralRe: Multiline textbox scrollbars cannot be moved Pin
robwm112-Jan-15 7:39
robwm112-Jan-15 7:39 
GeneralRe: Multiline textbox scrollbars cannot be moved Pin
Eddy Vluggen12-Jan-15 7:56
professionalEddy Vluggen12-Jan-15 7:56 
GeneralRe: Multiline textbox scrollbars cannot be moved Pin
robwm112-Jan-15 7:59
robwm112-Jan-15 7:59 
GeneralRe: Multiline textbox scrollbars cannot be moved Pin
Eddy Vluggen12-Jan-15 10:14
professionalEddy Vluggen12-Jan-15 10:14 
GeneralRe: Multiline textbox scrollbars cannot be moved Pin
robwm112-Jan-15 10:28
robwm112-Jan-15 10:28 
Question3 Dimensional Array C# Pin
Member 113642179-Jan-15 10:35
Member 113642179-Jan-15 10:35 
AnswerRe: 3 Dimensional Array C# Pin
PIEBALDconsult9-Jan-15 10:51
mvePIEBALDconsult9-Jan-15 10:51 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 7:08
Member 1136421710-Jan-15 7:08 
AnswerRe: 3 Dimensional Array C# Pin
Eddy Vluggen9-Jan-15 12:37
professionalEddy Vluggen9-Jan-15 12:37 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:51
Member 1136421710-Jan-15 6:51 
AnswerRe: 3 Dimensional Array C# Pin
BillWoodruff9-Jan-15 14:05
professionalBillWoodruff9-Jan-15 14:05 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:41
Member 1136421710-Jan-15 6:41 
GeneralRe: 3 Dimensional Array C# Pin
BillWoodruff10-Jan-15 8:19
professionalBillWoodruff10-Jan-15 8:19 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421711-Jan-15 16:10
Member 1136421711-Jan-15 16:10 
SuggestionRe: 3 Dimensional Array C# Pin
Richard Deeming12-Jan-15 2:03
mveRichard Deeming12-Jan-15 2:03 
AnswerRe: 3 Dimensional Array C# Pin
OriginalGriff9-Jan-15 22:45
mveOriginalGriff9-Jan-15 22:45 
GeneralRe: 3 Dimensional Array C# Pin
Member 1136421710-Jan-15 6:34
Member 1136421710-Jan-15 6:34 
GeneralRe: 3 Dimensional Array C# Pin
PIEBALDconsult10-Jan-15 7:10
mvePIEBALDconsult10-Jan-15 7:10 
QuestionRegistryKey showing Object reference not set to an instance of an object Pin
Jassim Rahma9-Jan-15 10:06
Jassim Rahma9-Jan-15 10:06 
Hi,

Why I am getting Object reference not set to an instance of an object when trying to read from registry? although I have a valid value there! The error is shown on this line:

C#
connection_string = "Server=" + myapplication.GetValue("ServerHost").ToString() + ";";


and the value of ServerHost is 127.0.0.1

C#
public string get_connectionstring(string system_key)
{
    string connection_string;

    RegistryKey myapplication_registry = Registry.LocalMachine.OpenSubKey("SOFTWARE\\myapplication", true);
    RegistryKey system_registry = Registry.LocalMachine.OpenSubKey("SOFTWARE\\myapplication\\" + system_key, true);
            
    connection_string = "Server=" + myapplication.GetValue("ServerHost").ToString() + ";";
    connection_string += "Port=" + myapplication.GetValue("ServerPort").ToString() + ";";
    connection_string += "Database=" + system_registry.GetValue("DatabaseName").ToString() + ";";
    connection_string += "Uid=" + myapplication.GetValue("ServerUserID").ToString() + ";";
    connection_string += "Pwd=" + cipher_utility.Decrypt<RijndaelManaged>(myapplication.GetValue("ServerPassword").ToString(), "{xxxxx-xxxx-xxxx-xxxx-xxxxxx}", "{xxxx-xxxx-xxxx-xxxx-xxxxx}") + ";";
    connection_string += "Connect Timeout=" + myapplication.GetValue("ConnectTimeout").ToString()+ ";";
    connection_string += "default command timeout=" + myapplication.GetValue("ConnectTimeout").ToString() + ";";

    return connection_string;
}



Technology News @ www.JassimRahma.com

AnswerRe: RegistryKey showing Object reference not set to an instance of an object Pin
Jassim Rahma9-Jan-15 11:50
Jassim Rahma9-Jan-15 11:50 
QuestionPlay a video Pin
AlecJames9-Jan-15 8:50
AlecJames9-Jan-15 8:50 

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.