Click here to Skip to main content
15,885,365 members

How can i do to don't have the same name in my Listbox

stefan from germany asked:

Open original thread
Hey Guy,

please i have 3 request.

1 .I don't really know how i can do in C# to block my listbox so that when the User gives the same name in TextBox that it reject it.in C#

2. My second request is about a ArrayList.

-I have without problem insert a list of evenement or action(for example: StandUP,Sleep,Eat,Work, answer ) in my Arraylist but i don't know how to make a Link or Relation between a diifferent action. I ask to sombody in the college he speak about a Tological Sort(). I don't no one thing about it.

Please I found one algorithm about it. But to transform it in C# language is so difficult for me.
Here is the Algorithme

C#
Calculate network(working-packages A = {wP1..., wPn}, dependence Dep ⊂ A × A)
  A' ← TOPOLOGICAL-SORT(A,Dep)
  (now all dependent WPs stand behind their(her) presuppositions)
  for WP ∈ A' (in accordance with topological order)
  doif WP is the first task   
    then [ EarliestBegin(WP) ← 0
       else [ EarliestBegin(WP) ← max X ∈ WP mit (X,WP) ∈ Dep : EarliestEnds(X)
     ⌊ EarliestEnds(WP) ← EarliestBegin(WP) + Duration(WP)
  for WP ∈ A' (in accordance with reverse topological order)
  do ⌈ if WP is Last Task      
    then [ LaterEnds(WP) ← maximum project duration (or  EarliestEnds(WP))
       else [ LaterEnds(WP) ← min X ∈ WP mit (WP,X) ∈ Dep : LaterBegin(X)
     ⌊ LaterBegin(WP) ← LaterEnd(WP) - Duration(WP)





Can someboy Help me to understand it maybe to explain me the different step please. the code i will try firstly for myself.

Please how can i understand interpretate it
thanks in advance
Leonce
Tags: C# (C# 4.0), SQL Server, Windows Forms, SQL Server 2008

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900