Click here to Skip to main content
15,906,947 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Attributes and methods Pin
Luc Pattyn12-Oct-09 0:08
sitebuilderLuc Pattyn12-Oct-09 0:08 
Question[Message Deleted] Pin
egpuyos11-Oct-09 22:04
egpuyos11-Oct-09 22:04 
AnswerRe: Dictionary Problem Pin
dan!sh 11-Oct-09 22:10
professional dan!sh 11-Oct-09 22:10 
GeneralRe: Dictionary Problem Pin
egpuyos11-Oct-09 22:12
egpuyos11-Oct-09 22:12 
GeneralRe: Dictionary Problem Pin
N a v a n e e t h11-Oct-09 22:17
N a v a n e e t h11-Oct-09 22:17 
GeneralRe: Dictionary Problem Pin
egpuyos11-Oct-09 22:28
egpuyos11-Oct-09 22:28 
GeneralRe: Dictionary Problem Pin
Luc Pattyn12-Oct-09 0:12
sitebuilderLuc Pattyn12-Oct-09 0:12 
GeneralRe: Dictionary Problem Pin
egpuyos11-Oct-09 22:14
egpuyos11-Oct-09 22:14 
This is the whole code Sir, thank you with the help Smile | :)

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<byte[], string> myDictionary = new Dictionary<byte[], string>();
            System.Text.ASCIIEncoding myEncoding = new ASCIIEncoding();
            string s;
            byte[] myByte;

            s = "test 001";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            s = "test 002";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            s = "test 003";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            s = "test 004";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            s = "test 0021537912";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            s = "test 327487";
            myByte = myEncoding.GetBytes(s);
            myDictionary.Add(myByte, s);

            string theString = "test 004";
            byte[] find = myEncoding.GetBytes(theString);
            
            if (myDictionary.ContainsKey(find))
            {
                Console.Write(find);
            }
            else
            {
                Console.Write("key not found.");
            }

            Console.Read();
        }
    }
}

GeneralRe: Dictionary Problem Pin
freakyit11-Oct-09 22:29
freakyit11-Oct-09 22:29 
Questionregarding auto generated mail in window application Pin
NarendraSinghJTV11-Oct-09 21:43
NarendraSinghJTV11-Oct-09 21:43 
AnswerRe: regarding auto generated mail in window application Pin
SeMartens11-Oct-09 21:49
SeMartens11-Oct-09 21:49 
GeneralRe: regarding auto generated mail in window application Pin
NarendraSinghJTV11-Oct-09 22:55
NarendraSinghJTV11-Oct-09 22:55 
QuestionProblem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)... Pin
spalanivel11-Oct-09 21:41
spalanivel11-Oct-09 21:41 
AnswerRe: Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)... Pin
Lyon Sun11-Oct-09 22:01
Lyon Sun11-Oct-09 22:01 
GeneralRe: Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)... Pin
spalanivel11-Oct-09 22:06
spalanivel11-Oct-09 22:06 
GeneralRe: Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)... Pin
Lyon Sun11-Oct-09 22:26
Lyon Sun11-Oct-09 22:26 
AnswerRe: Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)... Pin
dan!sh 11-Oct-09 22:07
professional dan!sh 11-Oct-09 22:07 
QuestionTo modify table column. Pin
kmb8911-Oct-09 19:54
kmb8911-Oct-09 19:54 
AnswerRe: To modify table column. Pin
SeMartens11-Oct-09 21:51
SeMartens11-Oct-09 21:51 
GeneralRe: To modify table column. Pin
kmb8911-Oct-09 22:14
kmb8911-Oct-09 22:14 
GeneralRe: To modify table column. Pin
SeMartens11-Oct-09 22:21
SeMartens11-Oct-09 22:21 
GeneralRe: To modify table column. Pin
kmb8911-Oct-09 22:51
kmb8911-Oct-09 22:51 
AnswerRe: To modify table column. Pin
Md. Marufuzzaman11-Oct-09 23:37
professionalMd. Marufuzzaman11-Oct-09 23:37 
GeneralRe: To modify table column. Pin
Md. Marufuzzaman11-Oct-09 23:41
professionalMd. Marufuzzaman11-Oct-09 23:41 
QuestionTimeout expired Pin
MozhdehQeraati11-Oct-09 19:12
MozhdehQeraati11-Oct-09 19:12 

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.